qontract-reconcile 0.10.1rc1186__py3-none-any.whl → 0.10.1rc1187__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.
- {qontract_reconcile-0.10.1rc1186.dist-info → qontract_reconcile-0.10.1rc1187.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc1186.dist-info → qontract_reconcile-0.10.1rc1187.dist-info}/RECORD +7 -7
- tools/cli_commands/erv2.py +42 -4
- tools/qontract_cli.py +35 -1
- {qontract_reconcile-0.10.1rc1186.dist-info → qontract_reconcile-0.10.1rc1187.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc1186.dist-info → qontract_reconcile-0.10.1rc1187.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc1186.dist-info → qontract_reconcile-0.10.1rc1187.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc1186.dist-info → qontract_reconcile-0.10.1rc1187.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.
|
3
|
+
Version: 0.10.1rc1187
|
4
4
|
Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
|
5
5
|
Home-page: https://github.com/app-sre/qontract-reconcile
|
6
6
|
Author: Red Hat App-SRE Team
|
{qontract_reconcile-0.10.1rc1186.dist-info → qontract_reconcile-0.10.1rc1187.dist-info}/RECORD
RENAMED
@@ -838,12 +838,12 @@ tools/app_interface_metrics_exporter.py,sha256=zkwkxdAUAxjdc-pzx2_oJXG25fo0Fnyd5
|
|
838
838
|
tools/app_interface_reporter.py,sha256=oZPib4HPq0aZ2Zui1QGJGk6qQdfpeihujGDBnSdKyGE,17627
|
839
839
|
tools/glitchtip_access_reporter.py,sha256=oPBnk_YoDuljU3v0FaChzOwwnk4vap1xEE67QEjzdqs,2948
|
840
840
|
tools/glitchtip_access_revalidation.py,sha256=8kbBJk04mkq28kWoRDDkfCGIF3GRg3pJrFAh1sW0dbk,2821
|
841
|
-
tools/qontract_cli.py,sha256=
|
841
|
+
tools/qontract_cli.py,sha256=EsrEPKyeVBeViz0x21hfA25vkaHVEKBxHRyhozhdXVY,143933
|
842
842
|
tools/sd_app_sre_alert_report.py,sha256=e9vAdyenUz2f5c8-z-5WY0wv-SJ9aePKDH2r4IwB6pc,5063
|
843
843
|
tools/template_validation.py,sha256=qpKYaTgk0GOPGa2Ct5_5sKdwIHtCAKIBGzsMPuJU5fw,3371
|
844
844
|
tools/cli_commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
845
845
|
tools/cli_commands/container_images_report.py,sha256=64LXkv3eoWtMFZwBgkYE9jSnReDD7A9M0GEVXsR9aGk,5183
|
846
|
-
tools/cli_commands/erv2.py,sha256=
|
846
|
+
tools/cli_commands/erv2.py,sha256=f_Zc5ZCPenXbFj8zv_kcKJgmGkErYHGNIhbzOfOaD4Q,22041
|
847
847
|
tools/cli_commands/gpg_encrypt.py,sha256=x02JOMn834z89YSNvr5B-oJky7rR1C0begCkPh45eHk,4958
|
848
848
|
tools/cli_commands/systems_and_tools.py,sha256=EMHOF1AtUDaoSk0bbjl6oUKYAz4rTZjIBaF-6E6GspM,16816
|
849
849
|
tools/cli_commands/cost_report/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -882,8 +882,8 @@ tools/test/test_qontract_cli.py,sha256=iuzKbQ6ahinvjoQmQLBrG4shey0z-1rB6qCgS8T6d
|
|
882
882
|
tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
|
883
883
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
884
884
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
885
|
-
qontract_reconcile-0.10.
|
886
|
-
qontract_reconcile-0.10.
|
887
|
-
qontract_reconcile-0.10.
|
888
|
-
qontract_reconcile-0.10.
|
889
|
-
qontract_reconcile-0.10.
|
885
|
+
qontract_reconcile-0.10.1rc1187.dist-info/METADATA,sha256=ELcUNPGIHkuAtwY7r9iKGDrX38eFrABpKVzusb48UB8,2213
|
886
|
+
qontract_reconcile-0.10.1rc1187.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
887
|
+
qontract_reconcile-0.10.1rc1187.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
|
888
|
+
qontract_reconcile-0.10.1rc1187.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
889
|
+
qontract_reconcile-0.10.1rc1187.dist-info/RECORD,,
|
tools/cli_commands/erv2.py
CHANGED
@@ -215,8 +215,44 @@ class Erv2Cli:
|
|
215
215
|
capture_output=True,
|
216
216
|
)
|
217
217
|
except CalledProcessError as e:
|
218
|
-
|
219
|
-
|
218
|
+
if e.stderr:
|
219
|
+
print(e.stderr.decode("utf-8"))
|
220
|
+
if e.stdout:
|
221
|
+
print(e.stdout.decode("utf-8"))
|
222
|
+
raise
|
223
|
+
|
224
|
+
def enter_shell(self, credentials: Path) -> None:
|
225
|
+
"""Run the CDKTF container and enter the shell."""
|
226
|
+
input_file = self.temp / "input.json"
|
227
|
+
input_file.write_text(self.input_data)
|
228
|
+
|
229
|
+
try:
|
230
|
+
run(["docker", "pull", self.image], check=True, capture_output=True)
|
231
|
+
run(
|
232
|
+
[
|
233
|
+
"docker",
|
234
|
+
"run",
|
235
|
+
"--name",
|
236
|
+
"erv2-debug-shell",
|
237
|
+
"--rm",
|
238
|
+
"-it",
|
239
|
+
"--mount",
|
240
|
+
f"type=bind,source={input_file!s},target=/inputs/input.json",
|
241
|
+
"--mount",
|
242
|
+
f"type=bind,source={credentials!s},target=/credentials",
|
243
|
+
"-e",
|
244
|
+
"AWS_SHARED_CREDENTIALS_FILE=/credentials",
|
245
|
+
"--entrypoint",
|
246
|
+
"/bin/bash",
|
247
|
+
self.image,
|
248
|
+
],
|
249
|
+
check=True,
|
250
|
+
)
|
251
|
+
except CalledProcessError as e:
|
252
|
+
if e.stderr:
|
253
|
+
print(e.stderr.decode("utf-8"))
|
254
|
+
if e.stdout:
|
255
|
+
print(e.stdout.decode("utf-8"))
|
220
256
|
raise
|
221
257
|
|
222
258
|
|
@@ -236,8 +272,10 @@ def tf_run(path: Path, cmd: list[str]) -> str:
|
|
236
272
|
env=env,
|
237
273
|
).stdout.decode("utf-8")
|
238
274
|
except CalledProcessError as e:
|
239
|
-
|
240
|
-
|
275
|
+
if e.stderr:
|
276
|
+
print(e.stderr.decode("utf-8"))
|
277
|
+
if e.stdout:
|
278
|
+
print(e.stdout.decode("utf-8"))
|
241
279
|
raise
|
242
280
|
|
243
281
|
|
tools/qontract_cli.py
CHANGED
@@ -7,6 +7,7 @@ import logging
|
|
7
7
|
import os
|
8
8
|
import re
|
9
9
|
import sys
|
10
|
+
import tempfile
|
10
11
|
import textwrap
|
11
12
|
from collections import defaultdict
|
12
13
|
from datetime import (
|
@@ -4203,7 +4204,7 @@ def request_reconciliation(ctx):
|
|
4203
4204
|
|
4204
4205
|
|
4205
4206
|
@external_resources.command()
|
4206
|
-
@binary(["terraform"])
|
4207
|
+
@binary(["terraform", "docker"])
|
4207
4208
|
@binary_version("terraform", ["version"], TERRAFORM_VERSION_REGEX, TERRAFORM_VERSION)
|
4208
4209
|
@click.option(
|
4209
4210
|
"--dry-run/--no-dry-run",
|
@@ -4320,6 +4321,39 @@ def migrate(ctx, dry_run: bool, skip_build: bool) -> None:
|
|
4320
4321
|
rich_print(f"[b red]Please remove the temporary directory ({tempdir}) manually!")
|
4321
4322
|
|
4322
4323
|
|
4324
|
+
@external_resources.command()
|
4325
|
+
@binary(["docker"])
|
4326
|
+
@click.pass_context
|
4327
|
+
def debug_shell(ctx) -> None:
|
4328
|
+
"""Enter an ERv2 debug shell to manually migrate resources."""
|
4329
|
+
# use a temporary directory in $HOME. The MacOS colima default configuration allows docker mounts from $HOME.
|
4330
|
+
with tempfile.TemporaryDirectory(dir=Path.home(), prefix="erv2-debug.") as _tempdir:
|
4331
|
+
tempdir = Path(_tempdir)
|
4332
|
+
with progress_spinner() as progress:
|
4333
|
+
with task(progress, "Preparing environment ..."):
|
4334
|
+
credentials_file = tempdir / "credentials"
|
4335
|
+
credentials_file.write_text(
|
4336
|
+
ctx.obj["secret_reader"].read_with_parameters(
|
4337
|
+
path=f"app-sre/external-resources/{ctx.obj['provisioner']}",
|
4338
|
+
field="credentials",
|
4339
|
+
format=None,
|
4340
|
+
version=None,
|
4341
|
+
)
|
4342
|
+
)
|
4343
|
+
os.environ["AWS_SHARED_CREDENTIALS_FILE"] = str(credentials_file)
|
4344
|
+
|
4345
|
+
erv2cli = Erv2Cli(
|
4346
|
+
provision_provider=ctx.obj["provision_provider"],
|
4347
|
+
provisioner=ctx.obj["provisioner"],
|
4348
|
+
provider=ctx.obj["provider"],
|
4349
|
+
identifier=ctx.obj["identifier"],
|
4350
|
+
secret_reader=ctx.obj["secret_reader"],
|
4351
|
+
temp_dir=tempdir,
|
4352
|
+
progress_spinner=progress,
|
4353
|
+
)
|
4354
|
+
erv2cli.enter_shell(credentials_file)
|
4355
|
+
|
4356
|
+
|
4323
4357
|
@get.command(help="Get all container images in app-interface defined namespaces")
|
4324
4358
|
@cluster_name
|
4325
4359
|
@namespace_name
|
{qontract_reconcile-0.10.1rc1186.dist-info → qontract_reconcile-0.10.1rc1187.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|