qontract-reconcile 0.10.2.dev315__py3-none-any.whl → 0.10.2.dev316__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qontract-reconcile
3
- Version: 0.10.2.dev315
3
+ Version: 0.10.2.dev316
4
4
  Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
5
5
  Project-URL: homepage, https://github.com/app-sre/qontract-reconcile
6
6
  Project-URL: repository, https://github.com/app-sre/qontract-reconcile
@@ -705,20 +705,20 @@ reconcile/utils/merge_request_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCe
705
705
  reconcile/utils/merge_request_manager/merge_request_manager.py,sha256=3EP6Yw_zB7nY0OkU8D_32nDqta1TITgtRI0cSmOlNQg,3332
706
706
  reconcile/utils/merge_request_manager/parser.py,sha256=5pGoz8Q6EuYXlUc1z-D0FahdRP2YLO8CpACoa9HcgtQ,2098
707
707
  reconcile/utils/mr/README.md,sha256=i9sCLkDFhSxAUtpa_I1_TxhR5vPOLcowuwn2VEWO41w,5794
708
- reconcile/utils/mr/__init__.py,sha256=RCpzyzmuP2gBCmTl-5ODNNwAnnbllGiNwWN-A_zG2EE,2593
709
- reconcile/utils/mr/app_interface_reporter.py,sha256=8ZcPlObg-At8Q20jVVTRqJYD4n_cYUjRRcGidNy4YjU,1804
708
+ reconcile/utils/mr/__init__.py,sha256=pgg5cAbf3c6GWBXanvz2SPFXLtUE_sYEKiHcY202og8,2633
709
+ reconcile/utils/mr/app_interface_reporter.py,sha256=5mRrGfyy8vkkOT3Rtw1ejteEdWBQW09VIxkUafckIj0,1899
710
710
  reconcile/utils/mr/app_sre_tekton_access_report.py,sha256=i7JeTkyaq0HyVGbAFKCNbiLy3NVE05IXqJzwArsGre4,1513
711
- reconcile/utils/mr/aws_access.py,sha256=G3pPPMQiL_TO1zGWEgH4gn_SHPFXfkCUvhCUGaT34KE,2657
712
- reconcile/utils/mr/base.py,sha256=M1Lg6zDYUhST4OMLuZzrosLtzc80Za6a1ejF6YyCjRg,8147
713
- reconcile/utils/mr/clusters_updates.py,sha256=T9eONmyTshEcd6UbYNDAslC6bw-Klql-Vr0scQBZnJE,2313
711
+ reconcile/utils/mr/aws_access.py,sha256=_mDOidMHi6xAyMdxU_fgSvpq3V1k4efXoBk4ZTDvKWw,2672
712
+ reconcile/utils/mr/base.py,sha256=5N0Ns9IKDtNL3UwopOWQMC-gf_8Hj48z0TaoQvI-EvY,8170
713
+ reconcile/utils/mr/clusters_updates.py,sha256=HbJYy3LdkfdE1oGpyfKli3g5rmVu4B73DrAQMTm7wWw,2410
714
714
  reconcile/utils/mr/glitchtip_access_reporter.py,sha256=cTkOtzdgeKPaqro0VS2hDuAClQiN4nZATh-mplQC-AI,1369
715
715
  reconcile/utils/mr/labels.py,sha256=9QRTRjZAtq45zELd9SwavaraczMjwjn5no3RK1YxFTg,825
716
716
  reconcile/utils/mr/notificator.py,sha256=f8IcGQ1_iBsXJFnhPsWQ7UE3NfigaOrXcVieJPplYrY,2955
717
717
  reconcile/utils/mr/ocm_update_recommended_version.py,sha256=KGOBURLE3XMynjAFej5D5PO9MJRDqMeoL1C8jLJMhD8,1570
718
- reconcile/utils/mr/ocm_upgrade_scheduler_org_updates.py,sha256=0myPruETuT6V2bjSSVPVsQu0ZHE9Jf3kRx5htt_fhKM,3038
718
+ reconcile/utils/mr/ocm_upgrade_scheduler_org_updates.py,sha256=Ykktb8diTv1u5ierJmbtbG04gkzUl3N3FgekKlUc5zg,3117
719
719
  reconcile/utils/mr/promote_qontract.py,sha256=oOjfxkDAFhMDWCT9xaRyLSYHcc67jCc34s_tENOuHGw,7226
720
720
  reconcile/utils/mr/update_access_report_base.py,sha256=LOXTIonpfxXrvZI9nPqkszW3OnuIgbFM7pFpqHxTMp0,4395
721
- reconcile/utils/mr/user_maintenance.py,sha256=OC9-3YkpXsYKZGsdOdx-NLq7AkjgrhDR2JL7hov7BV8,5669
721
+ reconcile/utils/mr/user_maintenance.py,sha256=_YwrGRube_Z_d00rkh0p7rMAtEz60R2Qec7u-pGmizU,5728
722
722
  reconcile/utils/ocm/__init__.py,sha256=Y-bp8GomMpyCo0tFW6kJ78-ZG1UIupYRtBzbMWU0kwM,798
723
723
  reconcile/utils/ocm/addons.py,sha256=_LDdJ-gapM3s5exKlIUt-MlXZTAUoHezbYBU0QmvfWQ,7335
724
724
  reconcile/utils/ocm/base.py,sha256=sy8mD9srj5dJjRIk8u8RRmj_D7h4MnpxtZwm4S4BWf8,14883
@@ -796,7 +796,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
796
796
  tools/saas_promotion_state/saas_promotion_state.py,sha256=uQv2QJAmUXP1g2GPIH30WTlvL9soY6m9lefpZEVDM5w,3965
797
797
  tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
798
798
  tools/sre_checkpoints/util.py,sha256=KcYVfa3UmJHVP_ocgrKe8NkrO5IDB9aWEDydSokPcRk,975
799
- qontract_reconcile-0.10.2.dev315.dist-info/METADATA,sha256=AE42AC4sotdY4LzNv1wIEFqqW1Qt8h1onk91ARjO-YQ,24916
800
- qontract_reconcile-0.10.2.dev315.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
801
- qontract_reconcile-0.10.2.dev315.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
802
- qontract_reconcile-0.10.2.dev315.dist-info/RECORD,,
799
+ qontract_reconcile-0.10.2.dev316.dist-info/METADATA,sha256=Tsr2Ebs2NqZuHQVUUdN0A9gp3-_wKiGi0AwdZco5mdI,24916
800
+ qontract_reconcile-0.10.2.dev316.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
801
+ qontract_reconcile-0.10.2.dev316.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
802
+ qontract_reconcile-0.10.2.dev316.dist-info/RECORD,,
@@ -1,3 +1,5 @@
1
+ from typing import Any
2
+
1
3
  from reconcile.utils.mr.app_interface_reporter import CreateAppInterfaceReporter
2
4
  from reconcile.utils.mr.aws_access import CreateDeleteAwsAccessKey
3
5
  from reconcile.utils.mr.base import (
@@ -44,7 +46,7 @@ class UnknownMergeRequestTypeError(Exception):
44
46
  """
45
47
 
46
48
 
47
- def init_from_sqs_message(message) -> MergeRequestBase:
49
+ def init_from_sqs_message(message: dict[str, Any]) -> MergeRequestBase:
48
50
  # First, let's find the classes that are inheriting from
49
51
  # MergeRequestBase and create a map where the class.name is
50
52
  # the key and the class itself is the value.
@@ -1,3 +1,4 @@
1
+ from collections.abc import Iterable
1
2
  from datetime import datetime
2
3
  from pathlib import Path
3
4
 
@@ -14,7 +15,9 @@ from reconcile.utils.mr.labels import AUTO_MERGE
14
15
  class CreateAppInterfaceReporter(MergeRequestBase):
15
16
  name = "create_app_interface_reporter_mr"
16
17
 
17
- def __init__(self, reports, email_body, reports_path):
18
+ def __init__(
19
+ self, reports: Iterable[dict[str, str]], email_body: str, reports_path: str
20
+ ) -> None:
18
21
  self.reports = reports
19
22
  self.email_body = email_body
20
23
  self.reports_path = reports_path
@@ -18,7 +18,7 @@ BODY_TEMPLATE = PROJ_ROOT / "templates" / "aws_access_key_email.j2"
18
18
  class CreateDeleteAwsAccessKey(MergeRequestBase):
19
19
  name = "create_delete_aws_access_key_mr"
20
20
 
21
- def __init__(self, account, path, key):
21
+ def __init__(self, account: str, path: str, key: str):
22
22
  self.account = account
23
23
  self.path = path.lstrip("/")
24
24
  self.key = key
@@ -45,14 +45,14 @@ class MergeRequestBase(ABC):
45
45
 
46
46
  name = "merge-request-base"
47
47
 
48
- def __init__(self):
48
+ def __init__(self) -> None:
49
49
  # Let's first get all the attributes from the instance
50
50
  # and use for the SQS Msg payload. With that, the msg
51
51
  # to the SQS is enough to create a new, similar, instance
52
52
  # of the child class.
53
53
  self.sqs_msg_data = {**self.__dict__}
54
54
 
55
- self.labels = [DO_NOT_MERGE_HOLD]
55
+ self.labels: Iterable[str] = [DO_NOT_MERGE_HOLD]
56
56
 
57
57
  random_id = str(uuid4())[:6]
58
58
  self.branch = f"{self.name}-{random_id}"
@@ -1,4 +1,6 @@
1
+ from collections.abc import Mapping
1
2
  from io import StringIO
3
+ from typing import Any
2
4
 
3
5
  from ruamel.yaml import YAML
4
6
 
@@ -15,7 +17,7 @@ yaml.width = 4096
15
17
  class CreateClustersUpdates(MergeRequestBase):
16
18
  name = "create_clusters_updates_mr"
17
19
 
18
- def __init__(self, clusters_updates):
20
+ def __init__(self, clusters_updates: Mapping[str, dict[str, Any]]):
19
21
  self.clusters_updates = clusters_updates
20
22
 
21
23
  super().__init__()
@@ -30,7 +32,7 @@ class CreateClustersUpdates(MergeRequestBase):
30
32
  def description(self) -> str:
31
33
  return DecisionCommand.APPROVED.value
32
34
 
33
- def process(self, gitlab_cli: GitLabApi):
35
+ def process(self, gitlab_cli: GitLabApi) -> None:
34
36
  changes = False
35
37
  for cluster_name, cluster_updates in self.clusters_updates.items():
36
38
  if not cluster_updates:
@@ -1,3 +1,6 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any
3
+
1
4
  from ruamel import yaml
2
5
 
3
6
  from reconcile.utils.gitlab_api import GitLabApi
@@ -8,7 +11,7 @@ from reconcile.utils.mr.labels import AUTO_MERGE
8
11
  class CreateOCMUpgradeSchedulerOrgUpdates(MergeRequestBase):
9
12
  name = "create_ocm_upgrade_scheduler_org_updates_mr"
10
13
 
11
- def __init__(self, updates_info):
14
+ def __init__(self, updates_info: Mapping[str, Any]):
12
15
  self.updates_info = updates_info
13
16
 
14
17
  super().__init__()
@@ -24,14 +24,14 @@ class PathSpec(BaseModel):
24
24
  path: str
25
25
 
26
26
  @validator("path")
27
- def prepend_data_to_path(cls, v):
27
+ def prepend_data_to_path(cls, v: str) -> str:
28
28
  return "data" + v
29
29
 
30
30
 
31
31
  class CreateDeleteUserAppInterface(MergeRequestBase):
32
32
  name = "create_delete_user_mr"
33
33
 
34
- def __init__(self, username, paths: Iterable[PathSpec]):
34
+ def __init__(self, username: str, paths: Iterable[PathSpec]) -> None:
35
35
  self.username = username
36
36
  self.paths = paths
37
37
 
@@ -120,7 +120,7 @@ class CreateDeleteUserInfra(MergeRequestBase):
120
120
 
121
121
  name = "create_ssh_key_mr"
122
122
 
123
- def __init__(self, usernames):
123
+ def __init__(self, usernames: Iterable[str]):
124
124
  self.usernames = usernames
125
125
 
126
126
  super().__init__()
@@ -135,7 +135,7 @@ class CreateDeleteUserInfra(MergeRequestBase):
135
135
  def description(self) -> str:
136
136
  return "delete user(s)"
137
137
 
138
- def process(self, gitlab_cli):
138
+ def process(self, gitlab_cli: GitLabApi) -> None:
139
139
  raw_file = gitlab_cli.get_raw_file(
140
140
  project=gitlab_cli.project,
141
141
  path=self.PLAYBOOK,