xpk 1.0.0__py3-none-any.whl → 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. xpk/commands/cluster.py +29 -30
  2. xpk/commands/cluster_gcluster.py +19 -14
  3. xpk/commands/cluster_test.py +1 -21
  4. xpk/commands/common.py +39 -6
  5. xpk/commands/common_test.py +170 -0
  6. xpk/commands/info.py +9 -5
  7. xpk/commands/inspector.py +33 -4
  8. xpk/commands/inspector_test.py +142 -0
  9. xpk/commands/workload.py +22 -8
  10. xpk/commands/workload_test.py +70 -3
  11. xpk/core/blueprint/blueprint_generator.py +19 -8
  12. xpk/core/blueprint/testing/data/a3_ultra.yaml +3 -1
  13. xpk/core/blueprint/testing/data/a4.yaml +3 -1
  14. xpk/core/capacity.py +37 -17
  15. xpk/core/capacity_test.py +66 -1
  16. xpk/core/cluster.py +10 -10
  17. xpk/core/cluster_private.py +3 -3
  18. xpk/core/cluster_test.py +29 -2
  19. xpk/core/docker_container.py +31 -24
  20. xpk/core/docker_manager.py +4 -4
  21. xpk/core/docker_resources.py +4 -1
  22. xpk/core/kueue_manager.py +6 -8
  23. xpk/core/kueue_manager_test.py +4 -5
  24. xpk/core/nap.py +14 -3
  25. xpk/core/nodepool.py +46 -13
  26. xpk/core/nodepool_test.py +143 -8
  27. xpk/core/remote_state/fuse_remote_state.py +1 -1
  28. xpk/core/scheduling.py +4 -1
  29. xpk/core/scheduling_test.py +1 -1
  30. xpk/core/system_characteristics.py +6 -0
  31. xpk/core/telemetry.py +11 -1
  32. xpk/core/telemetry_test.py +39 -0
  33. xpk/core/testing/commands_tester.py +26 -0
  34. xpk/core/testing/commands_tester_test.py +20 -1
  35. xpk/core/workload_decorators/rdma_decorator.py +9 -0
  36. xpk/parser/cluster.py +11 -1
  37. xpk/parser/cluster_test.py +59 -1
  38. xpk/parser/common.py +11 -0
  39. xpk/parser/storage.py +3 -3
  40. xpk/utils/console.py +1 -1
  41. xpk/utils/feature_flags.py +7 -3
  42. {xpk-1.0.0.dist-info → xpk-1.1.0.dist-info}/METADATA +37 -21
  43. {xpk-1.0.0.dist-info → xpk-1.1.0.dist-info}/RECORD +47 -54
  44. xpk-1.1.0.dist-info/top_level.txt +1 -0
  45. integration/README.md +0 -19
  46. integration/__init__.py +0 -15
  47. integration/docker_manager_test.py +0 -102
  48. integration/gcluster_a3mega_test.py +0 -215
  49. integration/gcluster_a3ultra_test.py +0 -187
  50. integration/gcluster_a4_test.py +0 -187
  51. integration/gcluster_test.py +0 -107
  52. xpk/utils/user_input.py +0 -48
  53. xpk/utils/user_input_test.py +0 -92
  54. xpk-1.0.0.dist-info/top_level.txt +0 -2
  55. {xpk-1.0.0.dist-info → xpk-1.1.0.dist-info}/WHEEL +0 -0
  56. {xpk-1.0.0.dist-info → xpk-1.1.0.dist-info}/entry_points.txt +0 -0
  57. {xpk-1.0.0.dist-info → xpk-1.1.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,10 +1,3 @@
1
- integration/README.md,sha256=EZwllubkB7mJt-DzPRNrhD0kkSV7TwaihmOX1mjNvAk,296
2
- integration/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
3
- integration/docker_manager_test.py,sha256=J2xijy6crRtrwQXrEvtOEY7mo1kEJYhcIYMZ7w0OGa4,2514
4
- integration/gcluster_a3mega_test.py,sha256=DoDEWWPTxjvn6T1ZNNXJEC64vlA7ywvtrSwYUEUn5Gg,6522
5
- integration/gcluster_a3ultra_test.py,sha256=XGZXuir2PeLjEI2Yt8VlIEmxtPHEHjeKQeMMBKTSGVg,6322
6
- integration/gcluster_a4_test.py,sha256=c5asoFLioHznq6-F7GjZf2JRqQuTODX5_bjJWuBcRwU,6230
7
- integration/gcluster_test.py,sha256=3GSOMszzNW6Yr4T4PFIpmszonwDAAGpSdKutUA77O-g,3304
8
1
  xpk/__init__.py,sha256=7mu-VQDQMyxM5To0KOhuYe4y2TYGsEkfV7hXZmUyih4,561
9
2
  xpk/main.py,sha256=esCpSoFhiA9ZGxcm6XWI6m2OIOsEeMnZt6OCkqMkjs0,3288
10
3
  xpk/telemetry_uploader.py,sha256=DW-eXiWpxc0Ga3igehhVIz-F3CmBwe1kl1Lbgbn0MOE,901
@@ -20,58 +13,60 @@ xpk/blueprints/a4/config-map.yaml.tftpl,sha256=o6LeGIYUfFGyj3vj-8ztV5ildQ46QZVl7
20
13
  xpk/blueprints/a4/nccl-rdma-installer-a4.yaml,sha256=if3WOmNLVGTJIJHU76EWC1FyiIXDTRIXcwo4OsBxarQ,2113
21
14
  xpk/blueprints/a4/storage_crd.yaml,sha256=r4WFXnSJJ25EUF-t4Ljfbl-cJoSaiFiZkP8451eTub4,1260
22
15
  xpk/commands/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
23
- xpk/commands/cluster.py,sha256=d5L8Kqfk93SZCxbPCZ5oePkqruWYZKi49rJ6yGgZSMg,45479
24
- xpk/commands/cluster_gcluster.py,sha256=Ig8jLjsiyFgw9U4BBEzDK2diA9m0STKQgz-uUTG_vYE,13731
16
+ xpk/commands/cluster.py,sha256=9LGVlrXg5C2w7wRKYTWe6lh3wSl7ZFpaNXSlpBfd0tc,45311
17
+ xpk/commands/cluster_gcluster.py,sha256=H6_pphIrIzDCHZg-ZH3o-xA2AgVQKSjE2HKbhIW6-Xo,13727
25
18
  xpk/commands/cluster_gcluster_test.py,sha256=zdxz5gAMu3HRVNsj7F-VYRf4TYSPMjuOG7DolQN2Pb4,6263
26
- xpk/commands/cluster_test.py,sha256=aMkwKrhoEuqElME16ztx5lwv4zT0z_xV0L3in1RaW6M,24017
27
- xpk/commands/common.py,sha256=p43sspD5RfYRj3Se_b-X0s0dbBs1PMI1qtySg6zZKKg,2706
19
+ xpk/commands/cluster_test.py,sha256=va1ODWx0Y2fSZIGzIsqEIVN25tIsfYr95ubcyxTMDfA,23494
20
+ xpk/commands/common.py,sha256=fsM4Sud3y1RU6a8JHi99l13O4raYvW2oPahCBzvMwh4,3884
21
+ xpk/commands/common_test.py,sha256=BDYFtN-cVfpEpj6akZy4R2KrnP53AIV1Lh1FEImhXx0,6106
28
22
  xpk/commands/config.py,sha256=L_zRpQTxMcSh6rxOT8gG263V6YGqzVoz4UxdWywTFdA,850
29
- xpk/commands/info.py,sha256=uhv5mPfgg9N-5JhQw4dT2jujL9ZC5kzGA18h9NFfm5A,7429
30
- xpk/commands/inspector.py,sha256=FPasKtGuEZKNXIQin4AG49clfD4b53NxXpWqBPZIIoE,12955
23
+ xpk/commands/info.py,sha256=iVGWMIaxPB54-nQGW7YqFdpVcgaKVJ5r4LZVxcSlo5Y,7486
24
+ xpk/commands/inspector.py,sha256=M_py1VFSTSYUrlUS32i3qUM8LkuHqPQ73FS1dkR6wfM,13911
25
+ xpk/commands/inspector_test.py,sha256=Jc-YnWW8eOHI8RDyz8HoJvN1XxG9XQTa0xe3scHiOXM,4305
31
26
  xpk/commands/managed_ml_diagnostics.py,sha256=87wmFbnYQY-kEpJfPo1Up53xM5P_P5wOlXczxHzxJjQ,6984
32
27
  xpk/commands/managed_ml_diagnostics_test.py,sha256=pQ1YUGMGRQFJYTS_1o9YyGUzYdLaBdA84LjbnncaeEo,3828
33
28
  xpk/commands/storage.py,sha256=cSTJN9Mjvdsvk_Nk43kVdQFhp89nxWbanDsTOGZCkpQ,10708
34
29
  xpk/commands/version.py,sha256=k30rdLP9clUM8eeSwRFhpfzSb1qwcQImTfuC59Ed6CA,771
35
- xpk/commands/workload.py,sha256=HV54qdjxR4fceQjae9Qpgdk9BY2C5Wh8a9aOS_kFY4E,31725
36
- xpk/commands/workload_test.py,sha256=KLSI4L01fWmPm7xNPXEpjABU5FC9P3CXVto1ifSiqKY,7322
30
+ xpk/commands/workload.py,sha256=gDIzul8myTHG5J45LRjeIC-iSeNJ9ATE1j3DJyt4k4A,32172
31
+ xpk/commands/workload_test.py,sha256=m79x6YDYn-36BX0CttTtAMdt_O-WJY40FLTGa6KwKg8,9804
37
32
  xpk/core/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
38
- xpk/core/capacity.py,sha256=_TyWayBkNU8fBpz1LTbCddEFZiZW5Qz-xmJnQMsXh0c,10534
39
- xpk/core/capacity_test.py,sha256=jZjMHTYlFLdAmBN1t9k29iABCSE5hlW0--q7QLDQpfQ,4330
40
- xpk/core/cluster.py,sha256=_h82ZmYufvBOezEUvy-DWOJv9h3SQsy5isL9qbYdq44,24001
41
- xpk/core/cluster_private.py,sha256=RLi0C7bV0NEUXl6QKQzvUT0weN9EdqPvjuuOQsNO0DY,6868
42
- xpk/core/cluster_test.py,sha256=J4Wk7E--ik_IsWWzL_iWGWbx99Ih03m-0bs-uU7gGDg,5853
33
+ xpk/core/capacity.py,sha256=MGiNOwBCwg8Ci-hsssbZYIJ2xXTm6Y5yKTO4J5ozqEk,11053
34
+ xpk/core/capacity_test.py,sha256=04ecANSECL3APmFCjdtkw2Wz6JxWkRZwE_QHa2m1_68,6026
35
+ xpk/core/cluster.py,sha256=RC-91Dk4nx9F-jLmZPP78ALlUgSBq670geaIqnRMZxY,24184
36
+ xpk/core/cluster_private.py,sha256=43BEO49MA-p1KfKuchxVZk6wwIlRCUU17j-6MMMeq4I,6868
37
+ xpk/core/cluster_test.py,sha256=VeC1C7kN0OJe6yeoL8GCaFk4uPhijP6CjvQAcE7q9xw,6653
43
38
  xpk/core/commands.py,sha256=at73VJHdZ4rVA8uvW997tNrvnCjP9v6zaw96bU0kd74,10841
44
39
  xpk/core/config.py,sha256=U2JDXx-XBuqQpZJf2iUDoww5--E8ejZfgmIxKeGu-gU,4668
45
40
  xpk/core/config_test.py,sha256=POSuofK0LFbNNygDAo2fjtKY4NMrRjUFeGcpBh9JOS4,3569
46
- xpk/core/docker_container.py,sha256=8hqWWNKtjf6dqCFRpfndTMGvN_NS6zhfBr7YuKfh7qo,7626
41
+ xpk/core/docker_container.py,sha256=Lsn6eJNN6dxvd7IbD0Ew4NnPKYM3VQyB8ursdG4jrIc,7919
47
42
  xpk/core/docker_image.py,sha256=9vwqbb6Mc3C5ZEOph03WS-EWI5hxMYGGigqzIMkDTjE,6909
48
- xpk/core/docker_manager.py,sha256=JBFgyD6O7LKwEHJC7YuSoCDZqrFRtb-LjgWNqkfAbR0,10566
49
- xpk/core/docker_resources.py,sha256=ycizZ1qLvvs52PiNh9FNqUwaF8UTQAG7pf99hfka1dQ,12491
43
+ xpk/core/docker_manager.py,sha256=vGPCWPDB507sxEsXvSD4IM-h5HqQzYLk7WSdCUmSDb4,10568
44
+ xpk/core/docker_resources.py,sha256=7EXV1CvwCVogE5-m6utSE1GXxwf6EpB4QDYeuGXWHmI,12547
50
45
  xpk/core/filestore.py,sha256=mcuUzsAPARbnrBG4fIGsEoN8NmzjaQ6k0tvIwMtjO9k,8068
51
46
  xpk/core/gcloud_context.py,sha256=d1wQ76zp7QMdG5BxB3sJz4b4OF5Mc8OzmPd_m0xd-Ys,6810
52
47
  xpk/core/gcloud_context_test.py,sha256=M8rp6S1zaEcAI7u4Bt8ukWKzv82HH5h9oYVojBcKgHk,5987
53
48
  xpk/core/gcluster_manager.py,sha256=lyv_MvdnkByy9_PEBj_ugAEBwnCbFNiWTSrEFjrMlPc,6236
54
49
  xpk/core/gcsfuse.py,sha256=kg5pgxdTjgiqquuGjev9fXzJPb8oiWPTK6wzCddzheQ,2125
55
50
  xpk/core/jobset.py,sha256=PJ4Fd8TNNLuYKNOMehoMYRIUEXyc5jsbHctJGqfW_8Y,4037
56
- xpk/core/kueue_manager.py,sha256=JB8DcD-RFvBdC9Mk_DDCAkI2Km8W5-KMTRMVec06LlM,20010
57
- xpk/core/kueue_manager_test.py,sha256=ZYnIOFN2ZgnrxBhoBkh9JUXP5YbFsoFI11iQnHspafI,22109
51
+ xpk/core/kueue_manager.py,sha256=qpz4Df7tfWNKzBFlTbMUfsHnXl15SdI7r_mHlCFRYdc,19998
52
+ xpk/core/kueue_manager_test.py,sha256=iJZFQE-fhQAI8MVXe66zUJpSbU5HHUZmNFnnCPCXNZs,22042
58
53
  xpk/core/monitoring.py,sha256=__bzTq_DIDAK8yIaN4F3MJh-yjYw5X1OlxmRgYOpf1g,4332
59
54
  xpk/core/mtc.py,sha256=pO7p3l-EzLFdTE8MdwWV8i0Zu-7epGql_kPoksVofIU,6259
60
- xpk/core/nap.py,sha256=7haJtWVfe9csfK-LmmIcDnmXCPIJFnoSviHaZ4y4i6s,12556
55
+ xpk/core/nap.py,sha256=gBxXu8Png1-BlAHbxLWZgbSXeLMGVixufkQVMR0fmvk,12963
61
56
  xpk/core/network.py,sha256=Oulb7U69lWkpOKxOC1C7ekJDpC51TLwd7XdZA3NQ7E0,10505
62
- xpk/core/nodepool.py,sha256=ehncCzvtDZ5lhyejRkYQCBjlcKHwKh3PXuGSLY1eWz8,24504
63
- xpk/core/nodepool_test.py,sha256=qx0VQ_YpgjB8Sf1KJvQCKQuCd3NmWvjBQuKdnT8NWKU,13358
57
+ xpk/core/nodepool.py,sha256=FX2ljKvwMsG3fXfn_CDCRwiKH4UAArQeDiFLq3XK9F0,25495
58
+ xpk/core/nodepool_test.py,sha256=9xSFpn-1j9Vd0J8KFzbq8ywS_Ibsbx4CgR1er68mRnw,17542
64
59
  xpk/core/pathways.py,sha256=32GxCIPiEBqSpK6g2gMmB7Nxj_HlG4I30u1C9UyWl1A,11594
65
60
  xpk/core/pathways_test.py,sha256=UeuSo_g9BNI27to-wflQwc6dJFVSA5-kOK_cjmY5qgU,1809
66
61
  xpk/core/ray.py,sha256=JWhc_ToRHpF4_URGnuE_47FMgamaRsA4KVUMpqThWzw,6145
67
62
  xpk/core/resources.py,sha256=dDsG_LOtcU17p1UKgOYyjdPxbMfqcb7pJ4SjfLDA6Os,9389
68
- xpk/core/scheduling.py,sha256=ucNOidEO_QQekIL44zG6Yhpr8gErPjJa6B2JJHb7diY,12404
69
- xpk/core/scheduling_test.py,sha256=dzdrUCc61Twu7WC86t1XNDg-7bWLYYz4hqBDWIVHKL4,15883
63
+ xpk/core/scheduling.py,sha256=UWEN7cstbvc_9EfSTD1efZD59L5oh7riwNs9TLbvx00,12542
64
+ xpk/core/scheduling_test.py,sha256=0QNiucR77tl72s5FOsp_8RKRp9CjjXSrrhAkTX9kMTg,15883
70
65
  xpk/core/storage.py,sha256=NILvVAcLNMLmp4wKx_TEKbMMF5X1oL-FrQV46PT0_ds,16902
71
- xpk/core/system_characteristics.py,sha256=y9v4WRN-u9yvo990MKbWTUOWlzn-f6vfaMNeikQlhHY,34115
66
+ xpk/core/system_characteristics.py,sha256=8WXi48mZ7eT9r57FZ5eFtmdonik7MItGTYiuYvcjXG8,34335
72
67
  xpk/core/system_characteristics_test.py,sha256=XVaKJ5wYdNwwwUKBnuK3zd1u-Qj3VnJR7MHlOeCa-K0,8029
73
- xpk/core/telemetry.py,sha256=R7IONNl5heMoNcOurfT3I34XJrBEODKVY88ONiDGuqE,7512
74
- xpk/core/telemetry_test.py,sha256=ll-B1ut9X-por17fpQnNb6hKrfyoZanMWRPbvqWrXss,8261
68
+ xpk/core/telemetry.py,sha256=IRwv91p_1-u_Pza-5GaV3wDibpZrTG0e3JMADyea9O8,7794
69
+ xpk/core/telemetry_test.py,sha256=o0ueLPXbKAn86CXIhooSef9iiU1uB7T5cbIZOMuQN6w,9556
75
70
  xpk/core/updates.py,sha256=FxLDgEL2O-qnslhT9U60NG5gzXmSv8Fn2wPUf3YZLM8,1734
76
71
  xpk/core/updates_test.py,sha256=oeGMv-wOHcOhWKGI4GnVLZ4Z_vCxLzLHeXRCi8rIDIM,2704
77
72
  xpk/core/vertex.py,sha256=DSrwoLmpWMZZe9ABdTxYI--50E11oEUC1mBLdrzOvdo,3573
@@ -79,35 +74,35 @@ xpk/core/workload.py,sha256=6TVZM15n8W7046VgmmH9Jv54MrhExtLQH3GaiwlV8Xs,8959
79
74
  xpk/core/workload_test.py,sha256=tVTvrwDRXD3O1GCoftgEBWilCYTN74ayP1KRP0vptx0,857
80
75
  xpk/core/blueprint/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
81
76
  xpk/core/blueprint/blueprint_definitions.py,sha256=OgKkMnz4xAnmnZLaXuehVzNm1Gr2R4HWgofc7qd_mC4,2258
82
- xpk/core/blueprint/blueprint_generator.py,sha256=qWUmB8mBuWgcGOJPKnUMACpl7nD08ns6B1mq-nPWHZU,37862
77
+ xpk/core/blueprint/blueprint_generator.py,sha256=-30_3bn103CwJ4FONLRaSpAOuQk7FakRFO9mSal-FyA,38362
83
78
  xpk/core/blueprint/blueprint_test.py,sha256=8wgH-HdYDySCVJh9RnxOTrkfBc1Nmv6ZXfzBzLlow54,7550
84
79
  xpk/core/blueprint/testing/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
85
80
  xpk/core/blueprint/testing/data/a3_mega.yaml,sha256=K3JMFuj-ZHgHPimeL_GJqmib47O0BMIp_DywzHG1wSU,3988
86
81
  xpk/core/blueprint/testing/data/a3_mega_spot.yaml,sha256=HLKNx4PxomvPtT0m_hcc7hFVraFalu-xlakqn6RxB_s,3843
87
- xpk/core/blueprint/testing/data/a3_ultra.yaml,sha256=J9PUvs-oAwsVRAdZhRBNHKcQ5FBcPqH6HclwM5sGyaY,6176
88
- xpk/core/blueprint/testing/data/a4.yaml,sha256=3jlo5y396-2iJu2ZFPxcK9E_GC86_kMTjzS3TmWB3QY,5695
82
+ xpk/core/blueprint/testing/data/a3_ultra.yaml,sha256=vYq5kEGvz_Q6M4r6rOLktneZTtGF8sd8-O3zNrZSjCY,6221
83
+ xpk/core/blueprint/testing/data/a4.yaml,sha256=VVTKXkoLH0pxes9vMvUBgka1Lj_zCMNbXZKmrraiZzc,5740
89
84
  xpk/core/remote_state/__init__.py,sha256=PkV8D9WOtlJHH5AIxsQaKeIBcmupT_Ol_bwJgN6G2I8,561
90
- xpk/core/remote_state/fuse_remote_state.py,sha256=3Dx4ZZd0NFF5-MlqGWHzz8H4bjYiPOWdF_YSEnKUPQ8,3246
85
+ xpk/core/remote_state/fuse_remote_state.py,sha256=IuTzeMSZRiAnMsBT4AJ7v9ITwueLw53S1Rkh6rIDWbA,3247
91
86
  xpk/core/remote_state/remote_state_client.py,sha256=6PcR92Xy_RMjlF4AscanQ1jXNHnewLWGNC2v53jbzD4,1077
92
87
  xpk/core/testing/__init__.py,sha256=PkV8D9WOtlJHH5AIxsQaKeIBcmupT_Ol_bwJgN6G2I8,561
93
- xpk/core/testing/commands_tester.py,sha256=mQOSFggESeTdzqG4srAPV9ezmoeT90r22K58yAty9sE,4445
94
- xpk/core/testing/commands_tester_test.py,sha256=NnLWh7TJ9rKtb-DtB-vwkxvCe5wNtvUJ0f6sOa87Ht4,4023
88
+ xpk/core/testing/commands_tester.py,sha256=ISnb20BF9nb8WxQKhzIdfYHOX7JTwHYQhgxhKvN7XOU,5181
89
+ xpk/core/testing/commands_tester_test.py,sha256=ZnnZp35edfuJslqtOPxkLYmeA5gjsXz_q3Zdak2utgM,4589
95
90
  xpk/core/workload_decorators/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
96
- xpk/core/workload_decorators/rdma_decorator.py,sha256=02HVA_jSyzlVtSQnQj7aPdK03h7v5YyioBqEen6pbj0,3636
91
+ xpk/core/workload_decorators/rdma_decorator.py,sha256=7UDJol77-NOl7C4BlK4bwab-HL-PyqzDPegT5t7o0oY,3841
97
92
  xpk/core/workload_decorators/storage_decorator.py,sha256=DDYQVO1OKTLhveDOA4V6b2RWr4n0fbwHdnoFFmW7iaQ,2000
98
93
  xpk/core/workload_decorators/tcpx_decorator.py,sha256=cLOntH2ekBcPeiPW0sU3TRozSCpcTxgxpzncrMbRj44,5962
99
94
  xpk/core/workload_decorators/tcpx_decorator_test.py,sha256=BmTWsFoBeLb9xhQh3kpqSiarkYax4bj2wLeZ9GrQzag,6089
100
95
  xpk/core/workload_decorators/tcpxo_decorator.py,sha256=5SgL-7aTHclN7rvCGvEOjZoUixBmyjfuhVIUBFmneug,6124
101
96
  xpk/parser/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
102
- xpk/parser/cluster.py,sha256=U2T-Q4yS86PWeFLNfknYWDDzZfubCKqIhqasxKLmErI,31342
103
- xpk/parser/cluster_test.py,sha256=xzQEC3IeAMpwsbNbHLuaNKxR3iaZcm3z4m3i61G62d4,6581
104
- xpk/parser/common.py,sha256=DBj0MQHbxcquPWJ3WcwdiaKhGJZgjdppNJrb9iUFQsE,6797
97
+ xpk/parser/cluster.py,sha256=2ib6qpIOPsw8nGlUM0qBzcgHrmRyDrmM8a8jzZEbz5E,31675
98
+ xpk/parser/cluster_test.py,sha256=_ssBirp_TnNny_mdHUgWmagxeTiCg23U1Nk_m-ZPf08,8015
99
+ xpk/parser/common.py,sha256=dCh_mtRzlmXwh__nKGjSrmkenzZieJpcrQrsEOQYtd0,7162
105
100
  xpk/parser/common_test.py,sha256=_6Fm2pUF7h4K0G5qxGabXSYr4ng9ihOzlViE6oLQwQs,1557
106
101
  xpk/parser/config.py,sha256=-XnWx9aFsBW4Uzo_hpOMD2ZQ0bdZLvq1ksv83_5jqSM,1633
107
102
  xpk/parser/core.py,sha256=rUgPYrqBgqoeuVVwcu3qMABs5KZ3jZI-lfkKywwpGYo,3340
108
103
  xpk/parser/info.py,sha256=UJohxVVWdt9IgUXoPsrVae2DN1BjAVGWrSN2ajrB8RQ,1860
109
104
  xpk/parser/inspector.py,sha256=hAPAZ2k9iSJgC1mjnz3rMleInsAQ8PmkyyUKFyBmsgY,1997
110
- xpk/parser/storage.py,sha256=VnMWSGW1xNIMz_cU-dk1CtpGSZEtZ9ecz1KI3bpQPqw,9945
105
+ xpk/parser/storage.py,sha256=2rpM3scZTGqeC_AVogQnInj3BGdClxhCHWSP3_0mnyA,9948
111
106
  xpk/parser/storage_test.py,sha256=i_F9cuQXHRvUy4RJwbfuuI8ZVpTpkkY96sZ1GZ4dLPw,1494
112
107
  xpk/parser/validators.py,sha256=-NBZelvfwZRzjz-YUCreD8EzMLHll8PZM-d-MVm2PG4,1192
113
108
  xpk/parser/version.py,sha256=eJo4PAbbmRQZulgKBs_ytbVgV9zAaaXeNzMMxmgFMVY,769
@@ -128,10 +123,10 @@ xpk/templates/kueue_super_slicing_topology.yaml.j2,sha256=4WkSfQ2A5-jnKWiHWj2WXl
128
123
  xpk/templates/mtc-cpc.yaml,sha256=MPx75tog09kjRAvHoNOPCEobigQ17d7pYCUnZCevSDQ,340
129
124
  xpk/templates/storage.yaml,sha256=AykdyMtDnKZF8Y_0BYxoYP03hEIzEk6iNalXAQHgAls,163
130
125
  xpk/utils/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
131
- xpk/utils/console.py,sha256=AJWSyjuWyLjb7SYt8kPb0gw9N84EN9LbLxYCXjC-6Ds,2464
126
+ xpk/utils/console.py,sha256=2f2ZjVXjH5z3VInMCPXAsJeH0I6kle7WfzcK86fkcXc,2463
132
127
  xpk/utils/console_test.py,sha256=x1v7v9VrIZwAKH-eOzj1lAY4EsHxJ6ruhfEOzpssO6o,2944
133
128
  xpk/utils/execution_context.py,sha256=hONGz1hQSKE-puah2rE_uN9YUeEC4oW82VOryw5_Vgo,1181
134
- xpk/utils/feature_flags.py,sha256=9QSMpdxcGR84unhOGJyCteT9R92-h5K6tOcjn5YHgDw,1160
129
+ xpk/utils/feature_flags.py,sha256=_Cbr4YQzk25fuSWYzinVnXfyTRnM9D0WMU_01mBTgBM,1223
135
130
  xpk/utils/file.py,sha256=yB1-k3FahoxkBpojB59vQNeZYOXB3pmktnjU4Ceah7M,2605
136
131
  xpk/utils/gcs_utils.py,sha256=zg-XSTv4G4TFjeT2bNBm2WLdDXPrOZi0rNv_JdppNg4,4113
137
132
  xpk/utils/kubectl.py,sha256=WKB9UhpouPN9G4n2ejRi_PgsYLI0R01gzkS1WGU6mJA,1828
@@ -143,15 +138,13 @@ xpk/utils/topology.py,sha256=MK9s2drBkL1F6V_uFh5K9jneOZ-VUbYLuTMFQWELwFU,1485
143
138
  xpk/utils/topology_test.py,sha256=jDXCPgBPfByqjhi0W9A5c8uOHOYjRav53nNlg71ipjk,1943
144
139
  xpk/utils/user_agent.py,sha256=1NMtixC1RIr_MwM5pJ0THQ0x1-fCQA92TFHjWAVZldw,1083
145
140
  xpk/utils/user_agent_test.py,sha256=lkv8LqzhlA1gXFVeBzoLwE1_iGnm8G9LzkkElMrIrx0,1774
146
- xpk/utils/user_input.py,sha256=kMdCcPWdkI31f1mJcMsNGda-xKyKxEerpSLpCqIWYPc,1503
147
- xpk/utils/user_input_test.py,sha256=xO34jkMoTAk5Cmw7yHTk-7YexzC2UZ6ajihV8lnlAyI,2666
148
141
  xpk/utils/validation.py,sha256=rE9LTkXJT7jIesodFb9pONL7ixhLqiQleyoaz7N39Dw,2765
149
142
  xpk/utils/validation_test.py,sha256=PEDSMUqZdt_Lx1FSR-LOTXKKtsJ47JH1fxugM0Gfz6Y,1168
150
143
  xpk/utils/versions.py,sha256=_Ep68W70a9605XjiaOOpBa9Is9jXlsoOiwL8v5Xt-WA,897
151
144
  xpk/utils/yaml.py,sha256=j8xuAJ9yAAwnQi6ozwZ-nMnDyDnc3xWkeBZMtSuP4RU,844
152
- xpk-1.0.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
153
- xpk-1.0.0.dist-info/METADATA,sha256=9woUe1dyR3fKZPXpoJeLwWTSNKCPZO--_LWee7UPRNc,8364
154
- xpk-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
155
- xpk-1.0.0.dist-info/entry_points.txt,sha256=mzEtiIesFkT1kmcTUVDA1o3uOhiniX6tIz2wmOlMu1M,38
156
- xpk-1.0.0.dist-info/top_level.txt,sha256=TQKZWgV7LSElvmunYT9V_627qOMoxq3qYzWAFzKudB8,16
157
- xpk-1.0.0.dist-info/RECORD,,
145
+ xpk-1.1.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
146
+ xpk-1.1.0.dist-info/METADATA,sha256=b9BX5o6QPikxeZlBzNsCRNSVUpQm3jQs6KSuYhyz88o,10013
147
+ xpk-1.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
148
+ xpk-1.1.0.dist-info/entry_points.txt,sha256=mzEtiIesFkT1kmcTUVDA1o3uOhiniX6tIz2wmOlMu1M,38
149
+ xpk-1.1.0.dist-info/top_level.txt,sha256=aDe4N0jicmuWExx_6w0TxWQJaEuPSs9BnLU-3aF1GLo,4
150
+ xpk-1.1.0.dist-info/RECORD,,
@@ -0,0 +1 @@
1
+ xpk
integration/README.md DELETED
@@ -1,19 +0,0 @@
1
- This folder contains integration tests.
2
-
3
- To run them env variables are needed:
4
-
5
- ```bash
6
- export PROJECT_ID=...
7
- export REGION=...
8
- export ZONE=...
9
- export AUTH_CIDR=...
10
- export DEPLOYMENT_DIR=...
11
- export CLUSTER_NAME=...
12
- export GCLOUD_CFG_PATH=...
13
- ```
14
-
15
- To run tests:
16
-
17
- ```bash
18
- pytest src/integration
19
- ```
integration/__init__.py DELETED
@@ -1,15 +0,0 @@
1
- """
2
- Copyright 2024 Google LLC
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- https://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- """
@@ -1,102 +0,0 @@
1
- """
2
- Copyright 2024 Google LLC
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- https://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- """
16
-
17
- import docker
18
- from docker.errors import APIError
19
- from xpk.core.docker_manager import DockerManager, ctk_build_ref
20
- import pytest
21
- import os
22
- import time
23
-
24
- test_cfg_path = '/tmp/xpk_gcloud_cfg'
25
- test_deployment_dir = '/tmp/xpk_deployment'
26
- test_gcluster_cmd = 'gcluster --version'
27
- test_ctk_xpk_img = 'gcluster-xpk'
28
- test_ctk_xpk_container = 'xpk-test-container'
29
-
30
-
31
- def remove_img():
32
- dc = docker.from_env()
33
- try:
34
- dc.images.remove(test_ctk_xpk_img, force=True)
35
- except APIError as _:
36
- pass
37
-
38
-
39
- def remove_container():
40
- dc = docker.from_env()
41
- try:
42
- container = dc.containers.get(test_ctk_xpk_container)
43
- container.remove(force=True)
44
- except APIError as _:
45
- pass
46
-
47
-
48
- def create_tmp_dirs():
49
- os.mkdir(test_cfg_path)
50
- os.mkdir(test_deployment_dir)
51
-
52
-
53
- def remove_tmp_dirs():
54
- os.removedirs(test_cfg_path)
55
- os.removedirs(test_deployment_dir)
56
-
57
-
58
- @pytest.fixture(name='setup_img_name')
59
- def remove_test_ctk_img():
60
- create_tmp_dirs()
61
- remove_container()
62
- remove_img()
63
- yield test_ctk_xpk_img
64
- remove_container()
65
- remove_img()
66
- remove_tmp_dirs()
67
-
68
-
69
- def test_docker_build_image(setup_img_name):
70
- dm = DockerManager(
71
- gcloud_cfg_path=test_cfg_path,
72
- working_dir=test_deployment_dir,
73
- img_name=setup_img_name,
74
- )
75
- dm.initialize()
76
-
77
- dc = docker.from_env()
78
- containers_before = dc.containers.list(all=True)
79
- dc.images.get(f'{setup_img_name}:{ctk_build_ref}')
80
- containers_after = dc.containers.list(all=True)
81
- assert len(containers_before) == len(containers_after)
82
-
83
-
84
- def test_run_command(setup_img_name):
85
-
86
- dm = DockerManager(
87
- gcloud_cfg_path=test_cfg_path,
88
- working_dir=test_deployment_dir,
89
- img_name=setup_img_name,
90
- remove_container=True,
91
- )
92
- dc = docker.from_env()
93
-
94
- containers_before = dc.containers.list(all=True)
95
- dm.initialize()
96
- dm.run_command(test_gcluster_cmd)
97
-
98
- time.sleep(2)
99
-
100
- containers_after = dc.containers.list(all=True)
101
-
102
- assert len(containers_after) - len(containers_before) == 0
@@ -1,215 +0,0 @@
1
- """
2
- Copyright 2024 Google LLC
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- https://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- """
16
-
17
- from xpk.commands.cluster_gcluster import get_unique_name
18
- from xpk.core.docker_manager import DockerManager
19
- from xpk.core.gcluster_manager import GclusterManager
20
- from xpk.core.blueprint.blueprint_generator import BlueprintGenerator
21
- from xpk.utils.versions import ReleaseChannel
22
- import pytest
23
- import os
24
- import shutil
25
-
26
- ctk_gcloud_cfg = os.getenv("GCLOUD_CFG_PATH")
27
- project_id = os.getenv("PROJECT_ID")
28
- region = os.getenv("REGION")
29
- zone = os.getenv("ZONE")
30
- auth_cidr = os.getenv("AUTH_CIDR")
31
- cluster_name = os.getenv("A3_MEGA_TEST_CLUSTER_NAME")
32
- release_channel = os.getenv("RELEASE_CHANNEL")
33
- cluster_version = os.getenv("CLUSTER_VERSION")
34
-
35
- uploads_dir = "uploads"
36
-
37
-
38
- @pytest.fixture(name="setup_tests")
39
- def prepare_test():
40
- pwd = os.getcwd()
41
- docker_path = os.path.join(pwd, "xpk_test_docker_dir")
42
- bp_path = os.path.join(pwd, "xpk_bp_path")
43
- if not os.path.exists(docker_path):
44
- os.makedirs(docker_path)
45
- if not os.path.exists(bp_path):
46
- os.makedirs(bp_path)
47
- yield (docker_path, bp_path)
48
- shutil.rmtree(docker_path)
49
- shutil.rmtree(bp_path)
50
-
51
-
52
- @pytest.mark.skip(
53
- reason=(
54
- "This test requires A3 capacity, therefore it should not be run on each"
55
- " build. Please invoke it manually if needed. "
56
- )
57
- )
58
- def test_deploy_a3_mega_deployment(setup_tests):
59
- docker_path, bp_path = setup_tests[0], setup_tests[1]
60
- (
61
- blueprint_name,
62
- prefix,
63
- gcluster_manager,
64
- staged_bp_path,
65
- ) = create_test_a3_mega_deployment(docker_path, bp_path)
66
- gcluster_manager.deploy(
67
- blueprint_path=staged_bp_path,
68
- deployment_name=blueprint_name,
69
- prefix=prefix,
70
- )
71
-
72
- # cleanup part
73
- gcluster_manager.destroy_deployment(
74
- deployment_name=blueprint_name, prefix=prefix
75
- )
76
- shutil.rmtree(docker_path)
77
- shutil.rmtree(bp_path)
78
-
79
-
80
- @pytest.mark.skip(
81
- reason=(
82
- "This test requires A3 capacity, therefore it should not be run on each"
83
- " build. Please invoke it manually if needed. "
84
- )
85
- )
86
- def test_create_a3_mega_deployment_files(setup_tests):
87
- assert project_id is not None
88
- assert region is not None
89
- assert zone is not None
90
- assert auth_cidr is not None
91
- assert ctk_gcloud_cfg is not None
92
- assert cluster_name is not None
93
- assert release_channel is not None
94
- assert cluster_version is not None
95
- docker_path, bp_path = setup_tests[0], setup_tests[1]
96
-
97
- blueprint_name = f"{cluster_name}-a3-mega-xpk"
98
- prefix = "prefix"
99
-
100
- docker_manager = DockerManager(
101
- gcloud_cfg_path=ctk_gcloud_cfg, working_dir=docker_path
102
- )
103
- docker_manager.initialize()
104
-
105
- bpm = BlueprintGenerator(storage_path=bp_path)
106
- a3_mega_blueprint = bpm.generate_a3_mega_blueprint(
107
- cluster_name=cluster_name,
108
- blueprint_name=blueprint_name,
109
- prefix=prefix,
110
- region=region,
111
- project_id=project_id,
112
- auth_cidr=auth_cidr,
113
- zone=zone,
114
- system_node_pool_min_node_count=3,
115
- release_channel=ReleaseChannel(release_channel),
116
- cluster_version=cluster_version,
117
- )
118
- blueprint_test_path = os.path.join(bp_path, prefix, f"{blueprint_name}.yaml")
119
- blueprint_deps_test_path = os.path.join(bp_path, prefix, blueprint_name)
120
-
121
- assert a3_mega_blueprint.blueprint_file == blueprint_test_path
122
- assert a3_mega_blueprint.blueprint_dependencies == blueprint_deps_test_path
123
-
124
- assert os.path.isfile(blueprint_test_path)
125
- assert os.path.isdir(blueprint_deps_test_path)
126
- assert os.path.isfile(
127
- os.path.join(blueprint_deps_test_path, "config-map.yaml.tftpl")
128
- )
129
-
130
- gcluster_manager = GclusterManager(
131
- gcluster_command_runner=docker_manager, remote_state_client=None
132
- )
133
-
134
- staged_bp_path = gcluster_manager.stage_files(
135
- blueprint_file=a3_mega_blueprint.blueprint_file,
136
- blueprint_dependencies=a3_mega_blueprint.blueprint_dependencies,
137
- prefix=prefix,
138
- )
139
-
140
- assert staged_bp_path == os.path.join(
141
- "/out", uploads_dir, prefix, f"{blueprint_name}.yaml"
142
- )
143
-
144
- staged_bp_path_local = os.path.join(
145
- docker_path, uploads_dir, prefix, f"{blueprint_name}.yaml"
146
- )
147
- staged_bp_deps_path_local = os.path.join(
148
- docker_path, uploads_dir, prefix, blueprint_name
149
- )
150
-
151
- assert os.path.isfile(staged_bp_path_local)
152
- assert os.path.isdir(staged_bp_deps_path_local)
153
- assert os.path.isfile(
154
- os.path.join(staged_bp_deps_path_local, "config-map.yaml.tftpl")
155
- )
156
- assert os.path.isfile(
157
- os.path.join(
158
- staged_bp_deps_path_local, "kueue-xpk-configuration.yaml.tftpl"
159
- )
160
- )
161
- unique_name = get_unique_name(project_id, region, zone)
162
- gcluster_manager.deploy(
163
- blueprint_path=staged_bp_path, deployment_name=unique_name, dry_run=True
164
- )
165
-
166
-
167
- def create_test_a3_mega_deployment(docker_path: str, bp_path: str):
168
- assert project_id is not None
169
- assert region is not None
170
- assert zone is not None
171
- assert auth_cidr is not None
172
- assert ctk_gcloud_cfg is not None
173
- assert cluster_name is not None
174
- assert release_channel is not None
175
- assert cluster_version is not None
176
-
177
- blueprint_name = f"{cluster_name}-a3-mega-xpk"
178
- prefix = "prefix"
179
-
180
- docker_manager = DockerManager(
181
- gcloud_cfg_path=ctk_gcloud_cfg, working_dir=docker_path
182
- )
183
- docker_manager.initialize()
184
-
185
- bpm = BlueprintGenerator(storage_path=bp_path)
186
- a3_mega_blueprint = bpm.generate_a3_mega_blueprint(
187
- cluster_name=cluster_name,
188
- blueprint_name=blueprint_name,
189
- prefix=prefix,
190
- region=region,
191
- project_id=project_id,
192
- auth_cidr=auth_cidr,
193
- zone=zone,
194
- system_node_pool_min_node_count=3,
195
- release_channel=ReleaseChannel(release_channel),
196
- cluster_version=cluster_version,
197
- )
198
-
199
- gcluster_manager = GclusterManager(
200
- gcluster_command_runner=docker_manager,
201
- remote_state_client=None,
202
- )
203
-
204
- staged_bp_path = gcluster_manager.stage_files(
205
- blueprint_file=a3_mega_blueprint.blueprint_file,
206
- blueprint_dependencies=a3_mega_blueprint.blueprint_dependencies,
207
- prefix=prefix,
208
- )
209
-
210
- return (
211
- blueprint_name,
212
- prefix,
213
- gcluster_manager,
214
- staged_bp_path,
215
- )