atlas-init 0.3.7__py3-none-any.whl → 0.4.1__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.
- atlas_init/__init__.py +1 -1
- atlas_init/atlas_init.yaml +9 -0
- atlas_init/cli.py +9 -3
- atlas_init/cli_cfn/app.py +11 -19
- atlas_init/cli_cfn/aws.py +3 -3
- atlas_init/cli_cfn/contract.py +227 -0
- atlas_init/cli_cfn/example.py +17 -5
- atlas_init/cli_cfn/files.py +21 -2
- atlas_init/cli_helper/go.py +7 -4
- atlas_init/cli_helper/run.py +23 -25
- atlas_init/cli_helper/run_manager.py +272 -0
- atlas_init/cli_helper/tf_runner.py +7 -14
- atlas_init/cli_root/__init__.py +10 -0
- atlas_init/cli_root/go_test.py +2 -0
- atlas_init/cli_root/trigger.py +149 -61
- atlas_init/cli_tf/debug_logs.py +3 -3
- atlas_init/cli_tf/debug_logs_test_data.py +24 -14
- atlas_init/cli_tf/github_logs.py +8 -5
- atlas_init/cli_tf/go_test_run.py +1 -1
- atlas_init/cli_tf/hcl/parser.py +1 -1
- atlas_init/cli_tf/mock_tf_log.py +1 -1
- atlas_init/cli_tf/schema_table.py +1 -3
- atlas_init/cli_tf/schema_v3.py +1 -1
- atlas_init/cloud/aws.py +63 -0
- atlas_init/settings/config.py +6 -0
- atlas_init/settings/env_vars.py +113 -100
- atlas_init/settings/env_vars_generated.py +34 -0
- atlas_init/settings/rich_utils.py +11 -3
- atlas_init/tf/modules/cfn/cfn.tf +1 -1
- atlas_init/tf/modules/cloud_provider/cloud_provider.tf +1 -1
- atlas_init/typer_app.py +66 -11
- {atlas_init-0.3.7.dist-info → atlas_init-0.4.1.dist-info}/METADATA +8 -8
- {atlas_init-0.3.7.dist-info → atlas_init-0.4.1.dist-info}/RECORD +35 -33
- {atlas_init-0.3.7.dist-info → atlas_init-0.4.1.dist-info}/WHEEL +1 -1
- atlas_init/cli_tf/go_test_run_format.py +0 -31
- {atlas_init-0.3.7.dist-info → atlas_init-0.4.1.dist-info}/entry_points.txt +0 -0
atlas_init/typer_app.py
CHANGED
@@ -7,16 +7,48 @@ import typer
|
|
7
7
|
|
8
8
|
from atlas_init import running_in_repo
|
9
9
|
from atlas_init.cli_cfn.app import app as app_cfn
|
10
|
+
from atlas_init.cli_helper.run import add_to_clipboard
|
11
|
+
from atlas_init.cli_root import set_dry_run
|
10
12
|
from atlas_init.cli_tf.app import app as app_tf
|
13
|
+
from atlas_init.cloud.aws import download_from_s3, upload_to_s3
|
11
14
|
from atlas_init.settings.env_vars import (
|
12
15
|
DEFAULT_PROFILE,
|
13
|
-
|
14
|
-
|
16
|
+
ENV_CLIPBOARD_COPY,
|
17
|
+
ENV_PROFILE,
|
18
|
+
ENV_PROJECT_NAME,
|
19
|
+
ENV_S3_PROFILE_BUCKET,
|
20
|
+
init_settings,
|
15
21
|
)
|
16
22
|
from atlas_init.settings.rich_utils import configure_logging, hide_secrets
|
17
23
|
|
18
24
|
logger = logging.getLogger(__name__)
|
19
|
-
|
25
|
+
|
26
|
+
|
27
|
+
def sync_on_done(return_value, s3_profile_bucket: str = "", use_clipboard: str = "", **kwargs):
|
28
|
+
logger.info(f"sync_on_done return_value={return_value} and {kwargs}")
|
29
|
+
settings = init_settings(non_required=True)
|
30
|
+
if s3_profile_bucket:
|
31
|
+
logger.info(f"using s3 bucket for profile sync: {s3_profile_bucket}")
|
32
|
+
upload_to_s3(settings.profile_dir, s3_profile_bucket)
|
33
|
+
if use_clipboard:
|
34
|
+
settings = settings or init_settings()
|
35
|
+
match use_clipboard:
|
36
|
+
case "manual":
|
37
|
+
env_path = settings.env_file_manual
|
38
|
+
case _:
|
39
|
+
env_path = settings.env_vars_generated
|
40
|
+
if env_path.exists():
|
41
|
+
clipboard_content = "\n".join(f"export {line}" for line in env_path.read_text().splitlines())
|
42
|
+
add_to_clipboard(clipboard_content, logger)
|
43
|
+
logger.info(f"loaded env-vars from {env_path} to clipboard ✅")
|
44
|
+
|
45
|
+
|
46
|
+
app = typer.Typer(
|
47
|
+
name="atlas_init",
|
48
|
+
invoke_without_command=True,
|
49
|
+
no_args_is_help=True,
|
50
|
+
result_callback=sync_on_done,
|
51
|
+
)
|
20
52
|
app.add_typer(app_cfn, name="cfn")
|
21
53
|
app.add_typer(app_tf, name="tf")
|
22
54
|
|
@@ -41,26 +73,49 @@ def main(
|
|
41
73
|
DEFAULT_PROFILE,
|
42
74
|
"-p",
|
43
75
|
"--profile",
|
44
|
-
envvar=
|
76
|
+
envvar=ENV_PROFILE,
|
45
77
|
help="used to load .env_manual, store terraform state and variables, and dump .env files.",
|
46
78
|
),
|
47
79
|
project_name: str = typer.Option(
|
48
80
|
"",
|
49
81
|
"--project",
|
50
|
-
envvar=
|
82
|
+
envvar=ENV_PROJECT_NAME,
|
51
83
|
help="atlas project name to create",
|
52
84
|
),
|
53
85
|
show_secrets: bool = typer.Option(False, help="show secrets in the logs"),
|
86
|
+
dry_run: bool = typer.Option(False, help="dry-run mode"),
|
87
|
+
s3_profile_bucket: str = typer.Option(
|
88
|
+
"",
|
89
|
+
"-s3",
|
90
|
+
"--s3-profile-bucket",
|
91
|
+
help="s3 bucket to store profiles will be synced before and after the command",
|
92
|
+
envvar=ENV_S3_PROFILE_BUCKET,
|
93
|
+
),
|
94
|
+
use_clipboard: str = typer.Option(
|
95
|
+
"",
|
96
|
+
help="add env-vars to clipboard, manual=.env-manual file, other value=.env-generated file",
|
97
|
+
envvar=ENV_CLIPBOARD_COPY,
|
98
|
+
),
|
54
99
|
):
|
100
|
+
set_dry_run(dry_run)
|
55
101
|
if profile != DEFAULT_PROFILE:
|
56
|
-
os.environ[
|
102
|
+
os.environ[ENV_PROFILE] = profile
|
57
103
|
if project_name != "":
|
58
|
-
os.environ[
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
104
|
+
os.environ[ENV_PROJECT_NAME] = project_name
|
105
|
+
if use_clipboard:
|
106
|
+
os.environ[ENV_CLIPBOARD_COPY] = use_clipboard
|
107
|
+
is_running_in_repo = running_in_repo()
|
108
|
+
handler = configure_logging(app, log_level, is_running_in_repo=is_running_in_repo)
|
109
|
+
logger.info(f"running in atlas-init repo: {is_running_in_repo} python location:{sys.executable}")
|
63
110
|
logger.info(f"in the app callback, log-level: {log_level}, command: {format_cmd(ctx)}")
|
111
|
+
if s3_bucket := s3_profile_bucket:
|
112
|
+
logger.info(f"using s3 bucket for profile sync: {s3_bucket}")
|
113
|
+
settings = init_settings(non_required=True)
|
114
|
+
download_from_s3(settings.profile_dir, s3_bucket)
|
115
|
+
settings = init_settings(required_env_vars=[])
|
116
|
+
if not show_secrets:
|
117
|
+
# must happen after init_settings that might load some env-vars
|
118
|
+
hide_secrets(handler, {**os.environ})
|
64
119
|
|
65
120
|
|
66
121
|
def format_cmd(ctx: typer.Context) -> str:
|
@@ -1,29 +1,29 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: atlas-init
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.1
|
4
4
|
Project-URL: Documentation, https://github.com/EspenAlbert/atlas-init#readme
|
5
5
|
Project-URL: Issues, https://github.com/EspenAlbert/atlas-init/issues
|
6
6
|
Project-URL: Source, https://github.com/EspenAlbert/atlas-init
|
7
7
|
Author-email: EspenAlbert <albertespen@gmail.com>
|
8
|
-
License: MIT
|
8
|
+
License-Expression: MIT
|
9
9
|
Classifier: Development Status :: 4 - Beta
|
10
10
|
Classifier: Programming Language :: Python
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
12
12
|
Requires-Python: >=3.12
|
13
13
|
Requires-Dist: appdirs==1.4.4
|
14
|
-
Requires-Dist: boto3==1.
|
14
|
+
Requires-Dist: boto3==1.35.92
|
15
15
|
Requires-Dist: gitpython==3.1.42
|
16
16
|
Requires-Dist: humanize==4.9.0
|
17
17
|
Requires-Dist: model-lib==0.0.30
|
18
18
|
Requires-Dist: mypy-boto3-cloudformation==1.34.66
|
19
|
-
Requires-Dist: orjson==3.
|
20
|
-
Requires-Dist: pydantic-settings==2.
|
19
|
+
Requires-Dist: orjson==3.10.13
|
20
|
+
Requires-Dist: pydantic-settings==2.7.1
|
21
21
|
Requires-Dist: pygithub==2.3.0
|
22
|
-
Requires-Dist: requests==2.
|
22
|
+
Requires-Dist: requests==2.32.2
|
23
23
|
Requires-Dist: rich==13.7.1
|
24
24
|
Requires-Dist: stringcase==1.2.0
|
25
25
|
Requires-Dist: tenacity==8.2.3
|
26
|
-
Requires-Dist: typer==0.
|
26
|
+
Requires-Dist: typer==0.15.1
|
27
27
|
Description-Content-Type: text/markdown
|
28
28
|
|
29
29
|
# Atlas Init - A CLI for developing integrations with MongoDB Atlas
|
@@ -1,65 +1,67 @@
|
|
1
|
-
atlas_init/__init__.py,sha256=
|
1
|
+
atlas_init/__init__.py,sha256=hcYIXZJV2-mrLNX9jKTnKK2SSftQXbrqcaDq8Wspcyc,372
|
2
2
|
atlas_init/__main__.py,sha256=dY1dWWvwxRZMmnOFla6RSfti-hMeLeKdoXP7SVYqMUc,52
|
3
|
-
atlas_init/atlas_init.yaml,sha256=
|
4
|
-
atlas_init/cli.py,sha256=
|
3
|
+
atlas_init/atlas_init.yaml,sha256=DN9zGb8Ll6krET9FgRSSYkvwLAaRNhrd1n-yPanbv9w,2283
|
4
|
+
atlas_init/cli.py,sha256=znbyirZl_tChG4SoGQPEM5iSsJiSVslCdExSja1qvUo,9262
|
5
5
|
atlas_init/cli_args.py,sha256=tiwUYAE0JBSl9lHV6VJ41vFCU90ChBZ4mKvi-YoF_HY,541
|
6
6
|
atlas_init/humps.py,sha256=l0ZXXuI34wwd9TskXhCjULfGbUyK-qNmiyC6_2ow6kU,7339
|
7
7
|
atlas_init/terraform.yaml,sha256=qPrnbzBEP-JAQVkYadHsggRnDmshrOJyiv0ckyZCxwY,2734
|
8
|
-
atlas_init/typer_app.py,sha256=
|
8
|
+
atlas_init/typer_app.py,sha256=RjOZRIV-hacWksgjLB0ip4DgA1fz5x-yHRWuSwSGEws,4254
|
9
9
|
atlas_init/cli_cfn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
-
atlas_init/cli_cfn/app.py,sha256=
|
11
|
-
atlas_init/cli_cfn/aws.py,sha256=
|
10
|
+
atlas_init/cli_cfn/app.py,sha256=DCwEp7kwJMytuy13jHr2M1jJ6sMWTthOc-LkHtNvoew,6104
|
11
|
+
atlas_init/cli_cfn/aws.py,sha256=KtJWJmYDknPFtd4j6evMFRwmnFGcLYUFHArV6J49TjI,17911
|
12
12
|
atlas_init/cli_cfn/cfn_parameter_finder.py,sha256=tAadNF1M_U2BTY-m9fXVXFXNQRvfudOja97jT3AiVaI,10811
|
13
|
-
atlas_init/cli_cfn/
|
14
|
-
atlas_init/cli_cfn/
|
13
|
+
atlas_init/cli_cfn/contract.py,sha256=6gRCvKRh6bn6BiQ3wyai_XNUwbWSqSRlg5GFvSdEcRc,7886
|
14
|
+
atlas_init/cli_cfn/example.py,sha256=_JuFyNEb7QvD4T8jQyAPI3TgnHW0wz0kVuncB5UkbEA,8530
|
15
|
+
atlas_init/cli_cfn/files.py,sha256=kwKDh__O__it2Shz3pHhnle4XUesRd4P929twxUODfI,2651
|
15
16
|
atlas_init/cli_helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
-
atlas_init/cli_helper/go.py,sha256=
|
17
|
-
atlas_init/cli_helper/run.py,sha256=
|
17
|
+
atlas_init/cli_helper/go.py,sha256=9a-hyQMZs_u4D3N2U7aVJGtd972TdcqJ05VlZTbuiBY,8652
|
18
|
+
atlas_init/cli_helper/run.py,sha256=va1eFP-hRvM76lVzvqH8eqGnyfcbzgR0zCMbL9Neb58,3660
|
19
|
+
atlas_init/cli_helper/run_manager.py,sha256=USNRHSm1zuu4H9NRamnxQ2D4gKzrHLk8dZe0G95Be14,9022
|
18
20
|
atlas_init/cli_helper/sdk.py,sha256=exh58-VZwxtosaxM269C62EEy1VnpJPOVziPDPkGsmE,2983
|
19
21
|
atlas_init/cli_helper/sdk_auto_changes.py,sha256=oWyXw7P0PdO28hclRvza_RcIVXAyzu0lCYTJTNBDMeo,189
|
20
|
-
atlas_init/cli_helper/tf_runner.py,sha256=
|
21
|
-
atlas_init/cli_root/__init__.py,sha256=
|
22
|
-
atlas_init/cli_root/go_test.py,sha256=
|
23
|
-
atlas_init/cli_root/trigger.py,sha256=
|
22
|
+
atlas_init/cli_helper/tf_runner.py,sha256=ZEh4WlI-6RV84uBtGNcFgAr8M03As-BLz4fu9wCPULw,3327
|
23
|
+
atlas_init/cli_root/__init__.py,sha256=Mf0wqy4kqq8pmbjLa98zOGuUWv0bLk2OYGc1n1_ZmZ4,223
|
24
|
+
atlas_init/cli_root/go_test.py,sha256=Xteq1zKqEtrejlSZPOXGgMq7LTxjbUPvsHZZ4o-PRT0,4593
|
25
|
+
atlas_init/cli_root/trigger.py,sha256=In3oS-z8gYYsPxQjHsGmqB1AsUtHPDTxwva5arsajvU,8227
|
24
26
|
atlas_init/cli_tf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
27
|
atlas_init/cli_tf/app.py,sha256=0Y5c-Pc9ibOz6kXvFlL-yhH_fx1nHLgBgK9OAVqjX9s,11390
|
26
28
|
atlas_init/cli_tf/changelog.py,sha256=biWYKf1pZvXZ-jEgcZ5q9sY7nTGrL2PuI0h9mCILf_g,3181
|
27
|
-
atlas_init/cli_tf/debug_logs.py,sha256=
|
28
|
-
atlas_init/cli_tf/debug_logs_test_data.py,sha256
|
29
|
+
atlas_init/cli_tf/debug_logs.py,sha256=P78XnlvBj0rBSceLF3nIuHPIRBnKKw1Ya2gY2zkbTsU,10046
|
30
|
+
atlas_init/cli_tf/debug_logs_test_data.py,sha256=s85x78pFweVyqL2BchkLuvuG9hm-bwl8zcSO-IQqm6c,9736
|
29
31
|
atlas_init/cli_tf/debug_logs_test_data_package_config.py,sha256=BOAgln1pWne_ZhP6a0SM2ddn2csr0sgGkYf2kMS_V9o,1666
|
30
|
-
atlas_init/cli_tf/github_logs.py,sha256=
|
31
|
-
atlas_init/cli_tf/go_test_run.py,sha256=
|
32
|
-
atlas_init/cli_tf/go_test_run_format.py,sha256=OUd6QPHDeTzbwVuh6MhP-xXgjOOGP9W_sCLJ8KylBTs,1201
|
32
|
+
atlas_init/cli_tf/github_logs.py,sha256=3QnN77qGM9fWNxamh_j7HfXcNPKrg26ut38g9cVoF6g,8280
|
33
|
+
atlas_init/cli_tf/go_test_run.py,sha256=N1iUUKjtyVc97TvQX8U43SIX4llOxnEXkPeC40SCcXw,6799
|
33
34
|
atlas_init/cli_tf/go_test_summary.py,sha256=agr4SITgxchjgOzRpScoTUk-iG38QDLkpnsMtTW9GTY,5382
|
34
|
-
atlas_init/cli_tf/mock_tf_log.py,sha256
|
35
|
+
atlas_init/cli_tf/mock_tf_log.py,sha256=-ZOtQmy9w7k7HvrywMqlgohZ6Kerojk-P_xtiTaZ4sc,7555
|
35
36
|
atlas_init/cli_tf/schema.py,sha256=iwvb4wD2Wba0MMu7ooTNAIi1jHbpLiXGPOT51_o_YW8,12431
|
36
37
|
atlas_init/cli_tf/schema_go_parser.py,sha256=PiRfFFVnkhltxcGFfOCgH53wwzIEynw2BXmSfaINLL8,8294
|
37
38
|
atlas_init/cli_tf/schema_inspection.py,sha256=ujLvGfg3baByND4nRD0drZoI45STxo3VfYvim-PfVOc,1764
|
38
|
-
atlas_init/cli_tf/schema_table.py,sha256=
|
39
|
+
atlas_init/cli_tf/schema_table.py,sha256=sxH-WUvBOHPI-HH2-2Y_MwKN-_POlQX3599h6YbfY1U,5261
|
39
40
|
atlas_init/cli_tf/schema_table_models.py,sha256=9gS3gYris0MjEWsY_gbLWcZwJokCUJS1TcVXnq7w5SA,5003
|
40
41
|
atlas_init/cli_tf/schema_v2.py,sha256=NtVW3lPKxHtCMBEwo9zThARpy9oQRbsKd0NrhymAyyE,21960
|
41
42
|
atlas_init/cli_tf/schema_v2_api_parsing.py,sha256=8XtwHNU84VPMATD3CbE-TLeVlgxqZggxY5QQ5YjhX4w,12888
|
42
43
|
atlas_init/cli_tf/schema_v2_sdk.py,sha256=AsAERT18FC97Gdb8r-qFInr4pSA15IGMUvCn-065XGE,12630
|
43
|
-
atlas_init/cli_tf/schema_v3.py,sha256=
|
44
|
+
atlas_init/cli_tf/schema_v3.py,sha256=LUeI2kniUDfd-5iP1TCLXb-Js92VYSXB6FCVLDYAIak,5788
|
44
45
|
atlas_init/cli_tf/schema_v3_sdk.py,sha256=5RWbhqKT8jEGgJrQaaT7xTRToviIzZZOxuJO5MNLYwo,9929
|
45
46
|
atlas_init/cli_tf/schema_v3_sdk_base.py,sha256=oe7WRZc0R_UYP5Yry4kDAMxOKAUHvQrc9bIdjfLshYk,2131
|
46
47
|
atlas_init/cli_tf/schema_v3_sdk_create.py,sha256=64AluGbQP47RRdY6Cz4KZRN9DdQISW5lLxQ-E1od5dc,8342
|
47
48
|
atlas_init/cli_tf/hcl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
48
49
|
atlas_init/cli_tf/hcl/cli.py,sha256=6V1kU_a1c4LA3rS7sWN821gQex00fb70AUyd07xO0es,5760
|
49
50
|
atlas_init/cli_tf/hcl/cluster_mig.py,sha256=kMb_0V_XWr_iQj-mZZ-mmzIvYOLfuC4FYGYYSe9VKkQ,12496
|
50
|
-
atlas_init/cli_tf/hcl/parser.py,sha256=
|
51
|
+
atlas_init/cli_tf/hcl/parser.py,sha256=wqj0YIn9nyEfjRqZnM7FH4yL43-K9ANvRiy9RCahImc,4833
|
51
52
|
atlas_init/cloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
|
-
atlas_init/cloud/aws.py,sha256=
|
53
|
+
atlas_init/cloud/aws.py,sha256=AXVobJ724S6OeEs_uXH9dvecc_klnXqejRnI7KaLyzo,4935
|
53
54
|
atlas_init/repos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
54
55
|
atlas_init/repos/cfn.py,sha256=rjyVVxRhWL65tdAbEHT72UReK2h99Bj6RA4O2pBO-bc,2466
|
55
56
|
atlas_init/repos/go_sdk.py,sha256=1OzM9DjHEAzAAuI9ygoRRuhUK2gqpOhXExXRqhqa0tg,1793
|
56
57
|
atlas_init/repos/path.py,sha256=wrT8e01OBoAHj8iMrxqutgqWu-BHPe9-bEWtcZRu238,4187
|
57
58
|
atlas_init/settings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
58
|
-
atlas_init/settings/config.py,sha256=
|
59
|
-
atlas_init/settings/env_vars.py,sha256=
|
59
|
+
atlas_init/settings/config.py,sha256=jQvLmPEocnXyfcKkTshp3TfQNPEuTayRauuOUqixPBA,6378
|
60
|
+
atlas_init/settings/env_vars.py,sha256=1M4EKveUbrHaEuSyWyZ_bdK7MUTHhBu8-tFGSimqCCI,10659
|
61
|
+
atlas_init/settings/env_vars_generated.py,sha256=c3dMShnSvqLsiJTIMoHCpC9Tvk35b5lra40Ske9l4gE,980
|
60
62
|
atlas_init/settings/interactive.py,sha256=Xy1Z5WMAOSaJ-vQI_4xjAbSR92rWQgnffwVoDT27L68,340
|
61
63
|
atlas_init/settings/path.py,sha256=KkXysu6-0AuSjsvYGknYGJX1hL2j1RD-Fpf8KsVYpkE,2618
|
62
|
-
atlas_init/settings/rich_utils.py,sha256=
|
64
|
+
atlas_init/settings/rich_utils.py,sha256=aIENYZ18XDqpK-f8zSNwL8PnOlW4Wv0BUT4x3REWHBM,1993
|
63
65
|
atlas_init/tf/.terraform.lock.hcl,sha256=DIojR50rr4fyLShYiQ-UpRV8z6vuBjwGWdK60FODoyM,6876
|
64
66
|
atlas_init/tf/always.tf,sha256=ij6QKI8Lg0140bFZwOyiYK5c-2p5e7AGZ1qKbYyv6Os,1359
|
65
67
|
atlas_init/tf/main.tf,sha256=DH0C8y9RDEHnSAZvL-TjE5MQjxj5ALfgk5zVO88cpZw,3960
|
@@ -72,11 +74,11 @@ atlas_init/tf/modules/aws_vars/aws_vars.tf,sha256=0SItDIZUWQCpw4o0y2jZjUY1LnUeUd
|
|
72
74
|
atlas_init/tf/modules/aws_vpc/aws_vpc.tf,sha256=TnWyDFLHi_aYEnqRCNLDjQmCSUPA0x_4A9fCvXL0vO0,1838
|
73
75
|
atlas_init/tf/modules/aws_vpc/provider.tf,sha256=0c2_hW9dSnwbK_1xdD4iSLiD6PACneBx5rEW06uWYlM,210
|
74
76
|
atlas_init/tf/modules/cfn/assume_role_services.yaml,sha256=Sv-FPsLeZ0K_3x0Eq5iJcf7yGe5ax8I0uqzvUlMZDOY,94
|
75
|
-
atlas_init/tf/modules/cfn/cfn.tf,sha256=
|
77
|
+
atlas_init/tf/modules/cfn/cfn.tf,sha256=ajBFLh0RYwAqRhp9-yanYKqfjNus0r88_gxRFdFfEj4,3019
|
76
78
|
atlas_init/tf/modules/cfn/kms.tf,sha256=W-HfFbQ2J1GQC279Ou-PLq4huf0mGn235BCEgO7n9aI,1635
|
77
79
|
atlas_init/tf/modules/cfn/resource_actions.yaml,sha256=rPQZ46YiN-PnpY91hDPOFJgZtlAiyIiyVE3P9yvo50o,540
|
78
80
|
atlas_init/tf/modules/cfn/variables.tf,sha256=qbYffl4ly0K8IRTwG3P7-Yyzm5OBTVRZCmDP69WMp44,379
|
79
|
-
atlas_init/tf/modules/cloud_provider/cloud_provider.tf,sha256=
|
81
|
+
atlas_init/tf/modules/cloud_provider/cloud_provider.tf,sha256=l1Tf0FegoeHYUvBmMBv60ZtZjeKIkT9S6mS4cc6815M,1281
|
80
82
|
atlas_init/tf/modules/cloud_provider/provider.tf,sha256=IDpMSLO3GjkxCvF-4qdHugxYq_w-Epujr51HZf_xB0Y,237
|
81
83
|
atlas_init/tf/modules/cluster/cluster.tf,sha256=TId4JsmSDlSHtIzmo3p4GKUVRhzZK9eoiI7DmoYgdq0,3041
|
82
84
|
atlas_init/tf/modules/cluster/provider.tf,sha256=RmUmMzMfOT5LZIWYqxM2EgtkI7JWqZfj3p3TxZkZoLk,161
|
@@ -88,7 +90,7 @@ atlas_init/tf/modules/vpc_peering/vpc_peering.tf,sha256=hJ3KJdGbLpOQednUpVuiJ0Cq
|
|
88
90
|
atlas_init/tf/modules/vpc_privatelink/atlas-privatelink.tf,sha256=FloaaX1MNDvoMZxBnEopeLKyfIlq6kaX2dmx8WWlXNU,1298
|
89
91
|
atlas_init/tf/modules/vpc_privatelink/variables.tf,sha256=gktHCDYD4rz6CEpLg5aiXcFbugw4L5S2Fqc52QYdJyc,255
|
90
92
|
atlas_init/tf/modules/vpc_privatelink/versions.tf,sha256=G0u5V_Hvvrkux_tqfOY05pA-GzSp_qILpfx1dZaTGDc,237
|
91
|
-
atlas_init-0.
|
92
|
-
atlas_init-0.
|
93
|
-
atlas_init-0.
|
94
|
-
atlas_init-0.
|
93
|
+
atlas_init-0.4.1.dist-info/METADATA,sha256=SHZ54VmuOMTcNQp_1wQpDAlw0LHeAEYifDrk15yva3g,5662
|
94
|
+
atlas_init-0.4.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
95
|
+
atlas_init-0.4.1.dist-info/entry_points.txt,sha256=oSNFIEAS9nUZyyZ8Fc-0F0U5j-NErygy01LpJVSHapQ,57
|
96
|
+
atlas_init-0.4.1.dist-info/RECORD,,
|
@@ -1,31 +0,0 @@
|
|
1
|
-
from collections import Counter
|
2
|
-
|
3
|
-
from github.WorkflowJob import WorkflowJob
|
4
|
-
from zero_3rdparty import datetime_utils
|
5
|
-
|
6
|
-
from atlas_init.cli_tf.go_test_run import GoTestRun, GoTestStatus
|
7
|
-
|
8
|
-
|
9
|
-
def format_job(job: WorkflowJob) -> str:
|
10
|
-
date = datetime_utils.date_filename(job.created_at)
|
11
|
-
exec_time = "0s"
|
12
|
-
if complete_ts := job.completed_at:
|
13
|
-
exec_time = f"{(complete_ts - job.created_at).total_seconds()}s"
|
14
|
-
return f"{date}_{job.workflow_name}_attempt{job.run_attempt}_ ({exec_time})"
|
15
|
-
|
16
|
-
|
17
|
-
def job_summary(runs: list[GoTestRun]) -> tuple[WorkflowJob, str]:
|
18
|
-
status_counts: dict[GoTestStatus, int] = Counter()
|
19
|
-
for run in runs:
|
20
|
-
status_counts[run.status] += 1
|
21
|
-
line = [f"{key}={status_counts[key]}" for key in sorted(status_counts.keys())]
|
22
|
-
job = runs[0].job
|
23
|
-
return job, f"{format_job(job)}:" + ",".join(line)
|
24
|
-
|
25
|
-
|
26
|
-
def fail_test_summary(runs: list[GoTestRun]) -> str:
|
27
|
-
failed_runs = [r for r in runs if r.is_failure]
|
28
|
-
failed_details: list[str] = [run.finish_summary() for run in failed_runs]
|
29
|
-
failed_names = [f"- {run.name}" for run in failed_runs]
|
30
|
-
delimiter = "\n" + "-" * 40 + "\n"
|
31
|
-
return "\n".join(failed_details) + delimiter + "\n".join(failed_names)
|
File without changes
|