From 916724f1e2517a963aebc2b2abc05a805a2ce24b Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Tue, 20 Aug 2024 16:57:42 -0500 Subject: [PATCH] Undeploy --- .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 176 bytes .../__pycache__/deploy_webapp.cpython-310.pyc | Bin 0 -> 3240 bytes ...eploy_webapp_from_registry.cpython-310.pyc | Bin 0 -> 12782 bytes .../__pycache__/run_webapp.cpython-310.pyc | Bin 0 -> 1452 bytes ...eploy_webapp_from_registry.cpython-310.pyc | Bin 0 -> 6295 bytes .../webapp/__pycache__/util.cpython-310.pyc | Bin 0 -> 15737 bytes .../webapp/deploy_webapp_from_registry.py | 11 +---- .../webapp/undeploy_webapp_from_registry.py | 45 ++++++++++++++++-- stack_orchestrator/deploy/webapp/util.py | 23 ++++++++- 9 files changed, 65 insertions(+), 14 deletions(-) create mode 100644 stack_orchestrator/deploy/webapp/__pycache__/__init__.cpython-310.pyc create mode 100644 stack_orchestrator/deploy/webapp/__pycache__/deploy_webapp.cpython-310.pyc create mode 100644 stack_orchestrator/deploy/webapp/__pycache__/deploy_webapp_from_registry.cpython-310.pyc create mode 100644 stack_orchestrator/deploy/webapp/__pycache__/run_webapp.cpython-310.pyc create mode 100644 stack_orchestrator/deploy/webapp/__pycache__/undeploy_webapp_from_registry.cpython-310.pyc create mode 100644 stack_orchestrator/deploy/webapp/__pycache__/util.cpython-310.pyc diff --git a/stack_orchestrator/deploy/webapp/__pycache__/__init__.cpython-310.pyc b/stack_orchestrator/deploy/webapp/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a3247a5410592fadbfb660c30a3c66407bb144d2 GIT binary patch literal 176 zcmd1j<>g`kf`rDcX(0MBh(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o10aKO;XkRlg)P zCowrYwNgJhwJ2G?xCF@2%`ZyMNG&cYN-W7Qf(XT<2&JSJ16fwg1SD7(0N&#*U;qFB literal 0 HcmV?d00001 diff --git a/stack_orchestrator/deploy/webapp/__pycache__/deploy_webapp.cpython-310.pyc b/stack_orchestrator/deploy/webapp/__pycache__/deploy_webapp.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d4f90fda0497a83b856e79d0a64becbc70b91a8e GIT binary patch literal 3240 zcmai0PjBPK73c83C|Q!V-nDnVY1qv+3pJpX21UDdgP_0$IrLxz*Z^&HQEAS|qD_kI zaJ04v>QHD;1s3@LZ2-Hset>?IUgp|UKS6=CNc!H8w&iV$kl_4zGxKKVz2EyiW?NgH z2G4JQ|JUi?2AcMF>})za%S^z}qfjj=&cW+Y~6jV;wS6FYUr zj%r(po3_TS)Ej%MZzt`vGw!5Y<1N*9l5W}?_f*?W`swy~8`>>4pdK4cP1>fN*XH;h z-2zEhNqV#ok{!BD2d}m9eWqPLxYC$*x=ZiTo!8o$tjTzf?OpCE=|g&-KA^jAbeQpw z?$L)g?MHN1e?42apahOc9T*TSD z_y~r(@jMnFU_3;b>_?o1g563$@%=_dS)OFeNtDe6yAUw2^Qn@&$kH^N(-*Z|cI$a5 zn~MpJxwPUmJYkWJXKx+{Y8Sp2@D+c6LTD8jcBNPPC831sSNh5jdS$H1mxGmAnU}_u zwz4Yg(xgU3VAT2*fWm}#4e*$|Khlc#&I!@*{SAD$mYQq*%kIjq>`PdA1*4m5sPgsc+m8Nb9Nl&c_6^X30Uc1nI`3a#CSAnM$k54JZJnc z$)Yfkp@b7Z3z1osvpFC4U4;fLiB0Ea!w8AThtP04s*V zk0}5vfSJC+iUpVf?^nhy)SJFnco}Va9@kMz;l-((OIY=P@bb&eRSGZmQR#cWKNBJk za-Ll*525G#fj`R%5#T)!eKiB6JX;7>)HCW?=+#62+1F%LK7FQEqTKhDsz79ier@%` z=O3z3-UYJ&P7E}ti+dd!ry^HdWtLP1ne$*c;boLW`cg% z^o~;Y0GI7zv4;gBsxBTuOZFNBfGV~883+s9$<=jY>gG3H)BU&Wc*G^%EexK*gb1Vm z`az^)8c()`(`&4lrvYQX==9fJ`OfZ(0K5%RyiqdJgpfr&mJ{ua+&N+j4k#@0|s+zKd z30C%+nb&+GjkD*)aH}Q^yH>|7FbX%JkS2PXx3F(xfp+9*QI0WFhnSuf(&jA9Ua?_E z8j-lTWt18N?X$%(!@!-!CqVzm%@fW};OKlQT{eHE0+jE7N~w#fLXWf*MaTyY5daAx z<6ozOx3RH(Ct;weeg@i#kD+iKSMQUqZUaVieTSIe>V{6 zXuK(m73fFL?tmHiPoY_E1p>5)Qhj{Nd+3dlgeWaxL+Z-u-FDK>}FWxB;YNbH<58zYH;n;^5=K7)cMI*bNuT$K7_GSD`s(_G)Kvz5R9X`TQdcK_;UC{{UU7atxi?= z@f^$q%V83WAg?UH80!2vTuZu~{cZtLS~|_?%3gf{ku`csD+u5aWd~0J(t`0IXqANqizrA)K&y(^eHB7;jw>NBz0PY7$ zjHk-~D(RyGYSV#V5s1LS%Dp!UTZI=tfFVA@;zKOna=u+}nZr6c0%M=~S_rGh}L@aYwaAbOE0MjV4s<{hoDXkO8jJfROVNu+$3Pyyq>z`F+ zrVVQk+4sY3<@;5+ru9aeEYyPSPzUr+a1_}32oa&NmsoPc;qqp4|-o< AumAu6 literal 0 HcmV?d00001 diff --git a/stack_orchestrator/deploy/webapp/__pycache__/deploy_webapp_from_registry.cpython-310.pyc b/stack_orchestrator/deploy/webapp/__pycache__/deploy_webapp_from_registry.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dbd1a31d2bc8464a75bd13c96a309cd5ea7b6704 GIT binary patch literal 12782 zcmb7KU2q)7ao*kAI~)#&!vQ$_1LP7Uh#%q(l1<4HL{TCMQc@&A3`tof#Pa2Evj7gb zKhEwE#Ck4L45gB|!ZP!e%8z0od5Hax%B!pLlJY|yY*+ayd01EZB`zUoV0|+THP`A4?)6>)4)6>(_J+~Cn=KT)CcZybe}@pH}?n#MGy zm$fzZ*4K1dHr5RJj;uxG+gvl{JGvH?@7P*QzPr}Cy_VTIaTRf>#L;K(v|+T{>s4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1LL@7u8MI7?m;mJs}hcxj!tB3P8wEtE5Ub2lA9YQOhy%y8>t769~l_fCmxZ zL^c%J-uBZ(Qr9@b?^7dUd}2hAWz}P!Cd|0ZnX2z3@~9ajgWN6Ugwsf^4p8=&val$l zR@Nh1i}wH$ZfRteDfyNlC}et*#;A^5EWXDtp}%f?kot!h(sHt9M%BcB8ly}uQgxIs zrc5s7b$AJ}J3JXTh zAS+J&29R?mNYq4(e=`SFzB&eKAVa{b|7A!fEk`0rs4TXWKIl~0^LD=aWZC@pcsi|5 zBIB+&9R+8EgL=e1NkyeBKN$V5leNHe6#EgzeU@g1`trYrZon&Br`I`7foz$bRn~2e ziqF#H59o289)C`c@8CfutyJ9cDc1(A@4T~+Q>!m0vmK7SH1m02>S}|!g){Tn*c4cf zZsf>4M{YtVF5|SX;mG?)YQrF#E_V%S&}G73rKKq&EG6K_YUm@8ejgw~1A&@Zdhiv7S$sC8S|ujP}>E{(pPY>_`9r literal 0 HcmV?d00001 diff --git a/stack_orchestrator/deploy/webapp/__pycache__/run_webapp.cpython-310.pyc b/stack_orchestrator/deploy/webapp/__pycache__/run_webapp.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0ea5bdf4c03e53f1b0bb1a6c17a27008e9131ad2 GIT binary patch literal 1452 zcmZWp&2HQ_5Ek{nTCMFmgd&K>_>N2k1NW8F=j}uMiYPhmsdaPzszsa)vYWkz%8fr{Q@1>!0)aK-2zK z%G<+1YY5IJ2&!>?$W*AvKp});v!FlOKYyq|4>QZn+ZN0TkzOO#& zS~2|j`)|LQPNV5hPmZO5jg@;Ph?k6?Ml}eLm5Z9+Qr=d@RUvvt!;v%+aW1XyqDyz% z3u&tQ_`ceGxGJ+3D~OVORSVz|g*xF`B^bxIfEi=c`W5N+*#Pg4QLn6rPb9|?WMYy7@*k^xuz&yn literal 0 HcmV?d00001 diff --git a/stack_orchestrator/deploy/webapp/__pycache__/undeploy_webapp_from_registry.cpython-310.pyc b/stack_orchestrator/deploy/webapp/__pycache__/undeploy_webapp_from_registry.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..49942936420c49ef5aec07d231162171797c532f GIT binary patch literal 6295 zcmb7I&2t;cb)TLYd=Ladkl=@?&yjYuE7$_0IR02GifY%A)~;kNXDOvNVI_qcqMP7A z0}R+bAjPR+N)@VdQ)-jSExT3V!G}HO4@lzjAK-F1m(*OHi;s?PTd|qn>luK+F4vU+ zH9ga>U%!6+y8HF-yi_<}JLbGX1Nf@-7~Aj~NCxIP;CI^v$-IuA5t? zep_3Xe%o8Ne&@Dwc$@d z3%tOKuZ*ntnJ@6lYfIM_d3CC`#Fu&PwW(WH_$pe~`1)&G z*DvsmN!vw!32m1%8CUpK)UIVU2jAEEjjZ+te{+iSCVz{+J>k5?>yz3t{~G`LE901b z)qktX*;Au_`&VSuCv`iSf9CZB{~+jegiKaHaN9xOYj28{r2?>JRa#Cs?qUb&c5UvaZP)H(#4a zc}>ZKVr7&3z)FaNx zPtdY1|DMW6#$OkX7SMVjUZB>!zr%dj!GZEiZU2O^e;jU%F4FullJQhO^~ER8umA-q z_J*Dm(c6#2zz+_4STTo#&<+E6=-gBe4}^01LFkAVSk-29<%hJKf;;@IgI-&;>kaNj z5C6RHZu`Os0|%R7$CEv0(&_{|)4d>kCy6=F<@)i#pS*#J?l(STBk z%^@qQq9S||ipGB64|_r-dFUHRp4@nEFz~&$8+t+iY(AUm0Gpa8%Kbs}Zu2hot{ol@ zu=n~7%o6T9#B zM3VD^18nrXHkV4~9=~Xd0VyPH2$oAUH5>`A-}2LAW8s~c9#1TF2!XEb>?e75Fc5v7 zl+Vzt8;vPeqQFa`u^+=Mv5nc^8TQk9E3LP7WYB}wsrzaU4wFln z@muHE>N-?WTPW;ek>yX9tvo9;`?PGAS=lOECNo);*}t=M6=s?yD>3ubK3yr=_$sj? zGc||J@c$qCv{basJm_VXH>tGE3S`N5AihnfVf>@-93Jfz-^533$ZBYG*~pBI6NYbV zWQVyJm)o&<0%z^vyw}Yq36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@HW(-(r{Zl0h}vd5LlG=}{z4;(oYI~@pT*WCxWBSZ+hZwqJz7*l<`x%s0_%*pL} zeOj!@yyrw;Pu0B1opZ$AQuQe*764fmPe>&*Svlps_| zIopZ4rqdSkd&IspjsPa1XtJbFz?3aj!g#VaKChH>JhO9Bo2F-~Yd4cD1N*jc9KXP= z10>Z7gO+$9+Q`NhXA@e>%sHlF9qIkbTu|8t?ak*lxpl;jCY?;{>o&y$;2USz4JGcV25_{}ua(xj}EB&VI83c5b^hLnFn zU;2|yg0b`baSA1N|=jUveC!^?;jLGcZmUCyuKzb&R<(X==bE%o^-`csf-)!&c_P5yo E0$M&Dp#T5? literal 0 HcmV?d00001 diff --git a/stack_orchestrator/deploy/webapp/__pycache__/util.cpython-310.pyc b/stack_orchestrator/deploy/webapp/__pycache__/util.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0cca3e338f8b170a1bcc35e8c106882e2d683161 GIT binary patch literal 15737 zcmbt*Ym6k9Xt(ocB zp6=dTHM={V8j0|%B?mE;D1jY2BAp&ZNWeUh#0CsIKmrFy{ul;q=TCyl6LA28ed;-*W2*$Yc(^w*^R83jFsES zy=*93Id=`^`1wP7qk#LAa&hk-S{p@`R^DA>V@73E7QeG9=g)0gDz6H6osIeaT~W>8 zZb8keIrLe?2=i(IBP?KqCAFxQ@N`){sZObtyXM9zRaUF&G-@mA5p@P_tLjm87Qd%6 zCjZrss&oDlW+|!1?xr>#QID%9(0WFFK%K|$qw0g|NAP=AnXen=54}sMt(VO>wb^LZ znswfe|JnVU;7L?`gTULczG`fm%2d`}Z^M>4LEvpTUo{+KBZXm8vG-gU>MMt6`{X03k1 z-@j1zb^SsR;-=Ep^=&^0buDb`6QTe%u4E;CU2--S;eI9+?M#L1f)B^tsXVh|lfNj_lAmwDhBZ zmVF4sMfU3;K|tDC*J+GYPU#eW5)jQ+t6P3p0|FY?_d*|_$~J;V3wv$V{n#PU%8vHX z9}q(?86h@r=^TeBuqd)1mY%>B@NU-h%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_H@_f&v_M_YwzC2-@Cwp z(e;9kUtgoMCEfDF+iiWLo29-`K?3@n{k}BaZU#?)9hc8%CEI$_8 zuuPMDm@>x_Bm0mwnw_%9@d6yN3_{TRkHx(RUd#%RJxJZxG*fcKd*u|1OAM&liD*9YPeBTdv zapL*De`#!GPmz&)0Sj{S$Y!CK1Xx(K=5D$WXDQAkOQBLnM6jO!|0$;p%|f~ui%0H z6BP04mJg#Bf}zSY#UoYS#Fq!aU1DXE9&nnNz9FQ5ucH8caU0s~#D!0b-g6T}JxBuk z1US8DVj2^GRF|CWdy+(I>LNjfYxrlQHuQFI?Fp!oZ||ta93b6>&KYi93}OJ15>yyb zA6QU)-~|SNyfB0B@z#btJ+k*fZ^-k(2=YOV$XF;wcna?`!oKd$W4=vmnO?^9`aSc4 zeisY+4woAx+$nWFKnl*glr=~*5ug)_`g<(?847$6vt9eh$3LO}C!hRt7PBmVkA-IO zFHpcO39}d{njfCQ7lHf}b9V~VI)@%#AviezgIDv=MxmD?Gk3+5)(J-{>5agA0arke znYhPiknAC}r@^n28eBYc(E0F1$xTQP{iGy~jQX7)>vtagz}Igsvv>dd6MRTzB{qly z%^peT;x>=-jaI$6r@(*lFwXmTMtAx@U^P>_i*vz^MyGmxpZ)*#h-emZ;*i$?f#0v; zl<5^f0`yK_6x@->eqTp%PCh~tpeJEPVTZrVsYKBf9aF5Pdw2%-_H+mbV{cLA_c&VUaHs#GRP%PBDI{lZ#%NC?I42LfV2BS?}0>3+!A(5qp=C z&n}-qe-hww<^olO>uTL9aHookg&pO#TeD9pIO5|D2|Fg{O LeeV^okk9{rW^+TN literal 0 HcmV?d00001 diff --git a/stack_orchestrator/deploy/webapp/deploy_webapp_from_registry.py b/stack_orchestrator/deploy/webapp/deploy_webapp_from_registry.py index e4053336..f8dd796f 100644 --- a/stack_orchestrator/deploy/webapp/deploy_webapp_from_registry.py +++ b/stack_orchestrator/deploy/webapp/deploy_webapp_from_registry.py @@ -489,12 +489,9 @@ def command( # noqa: C901 else: deployments = laconic.app_deployments({"by": payment_address}) deployments_by_request = {} - deployments_by_payment = {} for d in deployments: if d.attributes.request: deployments_by_request[d.attributes.request] = d - if d.attributes.payment: - deployments_by_request[d.attributes.payment] = d # Find removal requests. main_logger.log("Discovering deployment removal and cancellation requests...") @@ -532,13 +529,7 @@ def command( # noqa: C901 if min_required_payment: for r in requests_to_check_for_payment: main_logger.log(f"{r.id}: Confirming payment...") - if r.attributes.payment in deployments_by_payment: - main_logger.log( - f"Skipping request {r.id}: payment already applied to deployment " - f"{deployments_by_payment[r.attributes.payment].id}" - ) - dump_known_requests(state_file, [r], status="UNPAID") - elif confirm_payment( + if confirm_payment( laconic, r, payment_address, min_required_payment, main_logger ): main_logger.log(f"{r.id}: Payment confirmed.") diff --git a/stack_orchestrator/deploy/webapp/undeploy_webapp_from_registry.py b/stack_orchestrator/deploy/webapp/undeploy_webapp_from_registry.py index 3580e5ca..631a2fef 100644 --- a/stack_orchestrator/deploy/webapp/undeploy_webapp_from_registry.py +++ b/stack_orchestrator/deploy/webapp/undeploy_webapp_from_registry.py @@ -25,6 +25,7 @@ from stack_orchestrator.deploy.webapp.util import ( LaconicRegistryClient, match_owner, skip_by_tag, + confirm_payment, ) main_logger = TimedLogger(file=sys.stderr) @@ -159,6 +160,23 @@ def dump_known_requests(filename, requests): help="Exclude requests with matching tags (comma-separated).", default="", ) +@click.option( + "--min-required-payment", + help="Requests must have a minimum payment to be processed", + default=0, +) +@click.option( + "--payment-address", + help="The address to which payments should be made. " + "Default is the current laconic account.", + default=None, +) +@click.option( + "--all-requests", + help="Handle requests addressed to anyone (by default only requests to" + "my payment address are examined).", + is_flag=True, +) @click.pass_context def command( # noqa: C901 ctx, @@ -173,6 +191,9 @@ def command( # noqa: C901 dry_run, include_tags, exclude_tags, + min_required_payment, + payment_address, + all_requests, ): if request_id and discover: print("Cannot specify both --request-id and --discover", file=sys.stderr) @@ -201,7 +222,10 @@ def command( # noqa: C901 # all requests elif discover: main_logger.log("Discovering removal requests...") - requests = laconic.app_deployment_removal_requests() + if all_requests: + requests = laconic.app_deployment_removal_requests() + else: + requests = laconic.app_deployment_removal_requests({"to": payment_address}) if only_update_state: if not dry_run: @@ -242,7 +266,7 @@ def command( # noqa: C901 else: one_per_deployment[r.attributes.deployment] = r - requests_to_execute = [] + requests_to_check_for_payment = [] for r in one_per_deployment.values(): try: if r.attributes.deployment not in named_deployments: @@ -267,7 +291,7 @@ def command( # noqa: C901 else: if r.id not in previous_requests: main_logger.log(f"Request {r.id} needs to processed.") - requests_to_execute.append(r) + requests_to_check_for_payment.append(r) else: main_logger.log( f"Skipping unsatisfied request {r.id} because we have seen it before." @@ -275,6 +299,21 @@ def command( # noqa: C901 except Exception as e: main_logger.log(f"ERROR examining {r.id}: {e}") + requests_to_execute = [] + if min_required_payment: + for r in requests_to_check_for_payment: + main_logger.log(f"{r.id}: Confirming payment...") + if confirm_payment( + laconic, r, payment_address, min_required_payment, main_logger + ): + main_logger.log(f"{r.id}: Payment confirmed.") + requests_to_execute.append(r) + else: + main_logger.log(f"Skipping request {r.id}: unable to verify payment.") + dump_known_requests(state_file, [r]) + else: + requests_to_execute = requests_to_check_for_payment + main_logger.log( "Found %d unsatisfied request(s) to process." % len(requests_to_execute) ) diff --git a/stack_orchestrator/deploy/webapp/util.py b/stack_orchestrator/deploy/webapp/util.py index 18e0566a..0d8c3317 100644 --- a/stack_orchestrator/deploy/webapp/util.py +++ b/stack_orchestrator/deploy/webapp/util.py @@ -93,6 +93,11 @@ def is_id(name_or_id: str): def confirm_payment(laconic, record, payment_address, min_amount, logger): + req_owner = laconic.get_owner(record) + if req_owner == payment_address: + # No need to confirm payment if the sender and recipient are the same account. + return True + if not record.attributes.payment: logger.log(f"{record.id}: no payment tx info") return False @@ -108,7 +113,6 @@ def confirm_payment(laconic, record, payment_address, min_amount, logger): ) return False - req_owner = laconic.get_owner(record) if tx.sender != req_owner: logger.log( f"{record.id}: payment sender {tx.sender} in tx {tx.hash} does not match deployment " @@ -136,6 +140,23 @@ def confirm_payment(laconic, record, payment_address, min_amount, logger): ) return False + # Check if the payment was already used on a + used = laconic.app_deployments( + {"by": payment_address, "payment": tx.hash}, all=True + ) + if len(used): + logger.log(f"{record.id}: payment {tx.hash} already used on deployment {used}") + return False + + used = laconic.app_deployment_removals( + {"by": payment_address, "payment": tx.hash}, all=True + ) + if len(used): + logger.log( + f"{record.id}: payment {tx.hash} already used on deployment removal {used}" + ) + return False + return True