qontract-reconcile 0.10.1rc1111__py3-none-any.whl → 0.10.1rc1112__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.1rc1111.dist-info → qontract_reconcile-0.10.1rc1112.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc1111.dist-info → qontract_reconcile-0.10.1rc1112.dist-info}/RECORD +8 -8
- reconcile/utils/git.py +38 -4
- reconcile/utils/helm.py +2 -0
- reconcile/utils/saasherder/saasherder.py +1 -0
- {qontract_reconcile-0.10.1rc1111.dist-info → qontract_reconcile-0.10.1rc1112.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc1111.dist-info → qontract_reconcile-0.10.1rc1112.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc1111.dist-info → qontract_reconcile-0.10.1rc1112.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc1111.dist-info → qontract_reconcile-0.10.1rc1112.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.1rc1112
|
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.1rc1111.dist-info → qontract_reconcile-0.10.1rc1112.dist-info}/RECORD
RENAMED
@@ -676,14 +676,14 @@ reconcile/utils/extended_early_exit.py,sha256=QSktrmfw37zSRMNk930tDbQsVeKxaPPPD4
|
|
676
676
|
reconcile/utils/external_resource_spec.py,sha256=bhH_xneFwATdFumTPkiQmcVKYI0gcaWuqV6FpFdf_P0,7006
|
677
677
|
reconcile/utils/external_resources.py,sha256=GC4wYuSXwk2ifr3aDEwnEiumaYqWhzgKK-hXp6pXemA,7516
|
678
678
|
reconcile/utils/filtering.py,sha256=S4PbMHuFr3ED0P2Q_ea5CAaB7FimI62B-F5YTaKrphA,402
|
679
|
-
reconcile/utils/git.py,sha256=
|
679
|
+
reconcile/utils/git.py,sha256=wzVIYAeKlMGW538U1mkJWUI6h_mFRUY4lawh2AR8hw4,2345
|
680
680
|
reconcile/utils/git_secrets.py,sha256=y1rEhwA8DyDpBSAEuhMS7Y2X3mpxT2zQ4zyDFkhLe_g,1936
|
681
681
|
reconcile/utils/github_api.py,sha256=R8OvqyPdnRqvP-Efnv9RvIcbBlb4M0KC4RlbnJMD0Tg,2426
|
682
682
|
reconcile/utils/gitlab_api.py,sha256=C1nsHQKKybsmFdaG9vsItBjJm69ym4VWbqbKfAEf7oY,29305
|
683
683
|
reconcile/utils/gpg.py,sha256=EKG7_fdMv8BMlV5yUdPiqoTx-KrzmVSEAl2sLkaKwWI,1123
|
684
684
|
reconcile/utils/gql.py,sha256=C0thIm_k9MBldfqwHzyqtYZk9sIvMdm9IbbnXLGwjD8,14158
|
685
685
|
reconcile/utils/grouping.py,sha256=vr9SFHZ7bqmHYrvYcEZt-Er3-yQYfAAdq5sHLZVmXPY,456
|
686
|
-
reconcile/utils/helm.py,sha256=
|
686
|
+
reconcile/utils/helm.py,sha256=hr4J_9mBZwbc1FDNfFh4QKAj0h3eLxyTN2Y3UxIRp8U,3893
|
687
687
|
reconcile/utils/helpers.py,sha256=k9svgFFZG7H5FvHYY0g5jJyvgvh2UDZxf0Ib221teag,1179
|
688
688
|
reconcile/utils/imap_client.py,sha256=h8YDiCSCvroErhpH_-KGYI7Y2WU2Q2oSpuxDFbOkSbY,1989
|
689
689
|
reconcile/utils/instrumented_wrappers.py,sha256=eVwMoa6FCrYxLv3RML3WpZF9qKVfCTjMxphgVXG03OM,1073
|
@@ -819,7 +819,7 @@ reconcile/utils/runtime/sharding.py,sha256=r0ieUtNed7NvknSw6qQrCkKpVXE1shuHGnfFc
|
|
819
819
|
reconcile/utils/saasherder/__init__.py,sha256=3U8plqMAPRE1kjwZ5YnIsYsggTf4_gS7flRUEuXVBAs,343
|
820
820
|
reconcile/utils/saasherder/interfaces.py,sha256=C2wrw34OXypshVocAsPrVZsSHptgw4g9u7Haa2wulZQ,9087
|
821
821
|
reconcile/utils/saasherder/models.py,sha256=z8ln03zi2a8cu716NcNUDHp8Dv1VcVbhqdWVxCl7x9A,10148
|
822
|
-
reconcile/utils/saasherder/saasherder.py,sha256=
|
822
|
+
reconcile/utils/saasherder/saasherder.py,sha256=t7dqcXj9FFULROG_gUmdoSNQOLKfhdlquzwxw710yOA,85358
|
823
823
|
reconcile/utils/terraform/__init__.py,sha256=zNbiyTWo35AT1sFTElL2j_AA0jJ_yWE_bfFn-nD2xik,250
|
824
824
|
reconcile/utils/terraform/config.py,sha256=5UVrd563TMcvi4ooa5JvWVDW1I3bIWg484u79evfV_8,164
|
825
825
|
reconcile/utils/terraform/config_client.py,sha256=gRL1rQ0AqvShei_rcGqC3HDYGskOFKE1nPrJyJE9yno,4676
|
@@ -870,8 +870,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
|
|
870
870
|
tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
|
871
871
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
872
872
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
873
|
-
qontract_reconcile-0.10.
|
874
|
-
qontract_reconcile-0.10.
|
875
|
-
qontract_reconcile-0.10.
|
876
|
-
qontract_reconcile-0.10.
|
877
|
-
qontract_reconcile-0.10.
|
873
|
+
qontract_reconcile-0.10.1rc1112.dist-info/METADATA,sha256=jkBPZb4lP4Bc1Mkkf2qwJBozeU5pM6FhMy6qy3vCsz8,2213
|
874
|
+
qontract_reconcile-0.10.1rc1112.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
875
|
+
qontract_reconcile-0.10.1rc1112.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
|
876
|
+
qontract_reconcile-0.10.1rc1112.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
877
|
+
qontract_reconcile-0.10.1rc1112.dist-info/RECORD,,
|
reconcile/utils/git.py
CHANGED
@@ -19,11 +19,45 @@ def clone(repo_url, wd, depth=None, verify=True):
|
|
19
19
|
raise GitError(f"git clone failed: {repo_url}")
|
20
20
|
|
21
21
|
|
22
|
-
def
|
23
|
-
cmd = ["git", "
|
24
|
-
result = subprocess.run(cmd, cwd=wd, capture_output=True, check=
|
22
|
+
def rev_parse(ref: str, wd: str) -> str:
|
23
|
+
cmd = ["git", "rev-parse", ref]
|
24
|
+
result = subprocess.run(cmd, cwd=wd, capture_output=True, text=True, check=True)
|
25
|
+
return result.stdout.strip()
|
26
|
+
|
27
|
+
|
28
|
+
def is_current_ref(ref: str, wd: str) -> bool:
|
29
|
+
return rev_parse("HEAD", wd) == rev_parse(ref, wd)
|
30
|
+
|
31
|
+
|
32
|
+
def fetch(
|
33
|
+
ref: str,
|
34
|
+
wd: str,
|
35
|
+
remote: str = "origin",
|
36
|
+
depth: int | None = None,
|
37
|
+
verify: bool = True,
|
38
|
+
):
|
39
|
+
cmd = ["git"]
|
40
|
+
if not verify:
|
41
|
+
cmd += ["-c", "http.sslVerify=false"]
|
42
|
+
cmd += ["fetch", remote, ref]
|
43
|
+
if depth:
|
44
|
+
cmd += ["--depth", str(depth)]
|
45
|
+
result = subprocess.run(cmd, cwd=wd, capture_output=True, text=True, check=False)
|
46
|
+
if result.returncode != 0:
|
47
|
+
raise GitError(f"git fetch failed for {ref}: {result.stderr}")
|
48
|
+
|
49
|
+
|
50
|
+
def checkout(
|
51
|
+
ref: str,
|
52
|
+
wd: str,
|
53
|
+
verify: bool = True,
|
54
|
+
):
|
55
|
+
if not is_current_ref(ref, wd):
|
56
|
+
fetch(ref, wd, depth=1, verify=verify)
|
57
|
+
cmd = ["git", "checkout", ref]
|
58
|
+
result = subprocess.run(cmd, cwd=wd, capture_output=True, text=True, check=False)
|
25
59
|
if result.returncode != 0:
|
26
|
-
raise GitError(f"git checkout failed: {
|
60
|
+
raise GitError(f"git checkout failed for {ref}: {result.stderr}")
|
27
61
|
|
28
62
|
|
29
63
|
def is_file_in_git_repo(file_path):
|
reconcile/utils/helm.py
CHANGED
@@ -108,12 +108,14 @@ def template(
|
|
108
108
|
def template_all(
|
109
109
|
url: str,
|
110
110
|
path: str,
|
111
|
+
ref: str,
|
111
112
|
namespace: str,
|
112
113
|
values: Mapping[str, Any],
|
113
114
|
ssl_verify: bool = True,
|
114
115
|
) -> Iterable[Mapping[str, Any]]:
|
115
116
|
with tempfile.TemporaryDirectory() as wd:
|
116
117
|
git.clone(url, wd, depth=1, verify=ssl_verify)
|
118
|
+
git.checkout(ref, wd, verify=ssl_verify)
|
117
119
|
return yaml.safe_load_all(
|
118
120
|
do_template(values=values, path=f"{wd}{path}", namespace=namespace)
|
119
121
|
)
|
{qontract_reconcile-0.10.1rc1111.dist-info → qontract_reconcile-0.10.1rc1112.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|