qontract-reconcile 0.10.1rc1003__py3-none-any.whl → 0.10.1rc1005__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.1
2
2
  Name: qontract-reconcile
3
- Version: 0.10.1rc1003
3
+ Version: 0.10.1rc1005
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
@@ -167,7 +167,7 @@ reconcile/change_owners/changes.py,sha256=CH38-hyOfbH6xFYWidw_LAniyPisKq9nGRQhUa
167
167
  reconcile/change_owners/decision.py,sha256=iUJcIc_N_RqXIAY8D10RZqPMC2OinsHTMcqI6f6uylE,7606
168
168
  reconcile/change_owners/diff.py,sha256=0vyu29xCL24ZhUa7hqBni0NaxoCYRXLwvA-h8V23YQ4,9009
169
169
  reconcile/change_owners/implicit_ownership.py,sha256=6BehZvx4IjrphmOt_LLLk9_02Fl5BY5jd00Wuz_PBZk,4234
170
- reconcile/change_owners/self_service_roles.py,sha256=wxCxtROuQ9_0KjLke82ENRzNfVLh93gnXlPRjXahgfA,9683
170
+ reconcile/change_owners/self_service_roles.py,sha256=U-eU7G4YGg7atEKaJ8RpYgLUKden6xwggUHA7xJMowI,9714
171
171
  reconcile/change_owners/tester.py,sha256=yY15ABnWx_3g9QeeR38-cQAaql0aq7JIxBv_7KtC91U,8955
172
172
  reconcile/cluster_auth_rhidp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
173
173
  reconcile/cluster_auth_rhidp/integration.py,sha256=KIAiP_XFjsOA2OE8oFJa8lD0T1a7EwOmhct2xbj7tr8,9560
@@ -229,7 +229,7 @@ reconcile/gql_definitions/aws_version_sync/namespaces.py,sha256=eBLyXlSjWdmEE-jY
229
229
  reconcile/gql_definitions/change_owners/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
230
230
  reconcile/gql_definitions/change_owners/queries/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
231
231
  reconcile/gql_definitions/change_owners/queries/change_types.py,sha256=9S2YRNnSAvutjzuubZIQQe35yd8V2rGKvWSUI6yl11Q,5017
232
- reconcile/gql_definitions/change_owners/queries/self_service_roles.py,sha256=-7f7JO7_iYTQXAgPVwTDpgGi8NG8YR8cGv-wcC-KPVU,4699
232
+ reconcile/gql_definitions/change_owners/queries/self_service_roles.py,sha256=BcTQvnefPiShG90ajU_l2V6HUYSEXgdAzgiwY89vQew,4790
233
233
  reconcile/gql_definitions/cluster_auth_rhidp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
234
234
  reconcile/gql_definitions/cluster_auth_rhidp/clusters.py,sha256=Pp9P3Q30Be3szcVqOEOtPfYUNiGTq1xc5Juz-ApMMw0,3283
235
235
  reconcile/gql_definitions/cna/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -244,7 +244,7 @@ reconcile/gql_definitions/common/app_interface_dms_settings.py,sha256=h-N7-XGpmH
244
244
  reconcile/gql_definitions/common/app_interface_repo_settings.py,sha256=rud0rz9NIFF-h1fFdk3MnwGmx73rhwrn1taN_HefvyU,1754
245
245
  reconcile/gql_definitions/common/app_interface_state_settings.py,sha256=VXIK0Hmyv6GTShI86IGkjxyHGwufqUBAh617XKUAKaI,2507
246
246
  reconcile/gql_definitions/common/app_interface_vault_settings.py,sha256=w8quvdG0cSq71ZyJokPPp7MyMpoDb6-HLQ3o9JHVGRQ,1771
247
- reconcile/gql_definitions/common/app_quay_repos_escalation_policies.py,sha256=Nnl5ZSHukf0mux_Kfu_qSsTCQ6e9guytZTAApMRWz6Y,3050
247
+ reconcile/gql_definitions/common/app_quay_repos_escalation_policies.py,sha256=ckdoGse7O5uAWdZdNinkWicA2EflUb5pe8jWEBtflE8,3236
248
248
  reconcile/gql_definitions/common/aws_vpc_requests.py,sha256=2lpyy-QSfHPSTvV_zbnqzqUoFzVNl-CJDmoqd_zVSX4,2366
249
249
  reconcile/gql_definitions/common/aws_vpcs.py,sha256=Dss9dQ3xagnz3Ltg1e9mtG2PAmQGBbUzKCmmzvuN28s,1892
250
250
  reconcile/gql_definitions/common/clusters.py,sha256=Dr5AsSsTuqjAxkI9fU0fdiaP6u5qkmRpkkCcYDnU584,21868
@@ -826,7 +826,7 @@ tools/app_interface_metrics_exporter.py,sha256=zkwkxdAUAxjdc-pzx2_oJXG25fo0Fnyd5
826
826
  tools/app_interface_reporter.py,sha256=1ZP58LYV6ww3XOLVxgy8NKasMb1jQmp4BNqzTEB0VBE,17723
827
827
  tools/glitchtip_access_reporter.py,sha256=oPBnk_YoDuljU3v0FaChzOwwnk4vap1xEE67QEjzdqs,2948
828
828
  tools/glitchtip_access_revalidation.py,sha256=8kbBJk04mkq28kWoRDDkfCGIF3GRg3pJrFAh1sW0dbk,2821
829
- tools/qontract_cli.py,sha256=UC03zpZPnKu8M2CUmdaghhpN9ji4UYLQtr25hLnHAvg,126922
829
+ tools/qontract_cli.py,sha256=UabU_2Q4DFahWv4sG-iLYWO4B-zAZ6AnL9iV6W89k2g,126981
830
830
  tools/sd_app_sre_alert_report.py,sha256=e9vAdyenUz2f5c8-z-5WY0wv-SJ9aePKDH2r4IwB6pc,5063
831
831
  tools/template_validation.py,sha256=qpKYaTgk0GOPGa2Ct5_5sKdwIHtCAKIBGzsMPuJU5fw,3371
832
832
  tools/cli_commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -857,8 +857,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
857
857
  tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
858
858
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
859
859
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
860
- qontract_reconcile-0.10.1rc1003.dist-info/METADATA,sha256=BvrclMmgtgulHxm9l-sYJxOFagKY30ksQNJ9zzZx9nk,2263
861
- qontract_reconcile-0.10.1rc1003.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
862
- qontract_reconcile-0.10.1rc1003.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
863
- qontract_reconcile-0.10.1rc1003.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
864
- qontract_reconcile-0.10.1rc1003.dist-info/RECORD,,
860
+ qontract_reconcile-0.10.1rc1005.dist-info/METADATA,sha256=ghM_m_o_Ig_BZqOUBeZmvzWuu4Lj4lnA-XiPOnYv7mk,2263
861
+ qontract_reconcile-0.10.1rc1005.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
862
+ qontract_reconcile-0.10.1rc1005.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
863
+ qontract_reconcile-0.10.1rc1005.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
864
+ qontract_reconcile-0.10.1rc1005.dist-info/RECORD,,
@@ -19,7 +19,7 @@ from reconcile.gql_definitions.change_owners.queries.self_service_roles import (
19
19
  PermissionSlackUsergroupV1,
20
20
  RoleV1,
21
21
  )
22
- from reconcile.utils import gql
22
+ from reconcile.utils import expiration, gql
23
23
  from reconcile.utils.membershipsources.models import (
24
24
  RoleBot,
25
25
  RoleMember,
@@ -45,7 +45,7 @@ class DatafileIncompatibleWithChangeTypeError(Exception):
45
45
 
46
46
  def fetch_self_service_roles(gql_api: gql.GqlApi) -> list[RoleV1]:
47
47
  roles: list[RoleV1] = []
48
- for r in self_service_roles.query(gql_api.query).roles or []:
48
+ for r in expiration.filter(self_service_roles.query(gql_api.query).roles or []):
49
49
  if not r.self_service:
50
50
  continue
51
51
  validate_self_service_role(r)
@@ -87,6 +87,7 @@ query SelfServiceRolesQuery($name: String) {
87
87
  memberSources {
88
88
  ...RoleMembershipSource
89
89
  }
90
+ expirationDate
90
91
  }
91
92
  }
92
93
  """
@@ -152,6 +153,7 @@ class RoleV1(ConfiguredBaseModel):
152
153
  bots: list[BotV1] = Field(..., alias="bots")
153
154
  permissions: Optional[list[Union[PermissionSlackUsergroupV1, PermissionGitlabGroupMembershipV1, PermissionV1]]] = Field(..., alias="permissions")
154
155
  member_sources: Optional[list[RoleMembershipSource]] = Field(..., alias="memberSources")
156
+ expiration_date: Optional[str] = Field(..., alias="expirationDate")
155
157
 
156
158
 
157
159
  class SelfServiceRolesQueryQueryData(ConfiguredBaseModel):
@@ -22,6 +22,9 @@ DEFINITION = """
22
22
  query AppQuayReposEscalationPolicies {
23
23
  apps: apps_v1 {
24
24
  name
25
+ parentApp {
26
+ name
27
+ }
25
28
  escalationPolicy {
26
29
  channels {
27
30
  email
@@ -52,6 +55,10 @@ class ConfiguredBaseModel(BaseModel):
52
55
  extra=Extra.forbid
53
56
 
54
57
 
58
+ class AppV1_AppV1(ConfiguredBaseModel):
59
+ name: str = Field(..., alias="name")
60
+
61
+
55
62
  class PermissionSlackUsergroupV1(ConfiguredBaseModel):
56
63
  handle: str = Field(..., alias="handle")
57
64
 
@@ -85,6 +92,7 @@ class AppQuayReposV1(ConfiguredBaseModel):
85
92
 
86
93
  class AppV1(ConfiguredBaseModel):
87
94
  name: str = Field(..., alias="name")
95
+ parent_app: Optional[AppV1_AppV1] = Field(..., alias="parentApp")
88
96
  escalation_policy: AppEscalationPolicyV1 = Field(..., alias="escalationPolicy")
89
97
  quay_repos: Optional[list[AppQuayReposV1]] = Field(..., alias="quayRepos")
90
98
 
tools/qontract_cli.py CHANGED
@@ -2852,7 +2852,7 @@ def container_image_details(ctx):
2852
2852
  apps = get_apps_quay_repos_escalation_policies()
2853
2853
  data: list[dict[str, str]] = []
2854
2854
  for app in apps:
2855
- app_name = app.name
2855
+ app_name = f"{app.parent_app.name}/{app.name}" if app.parent_app else app.name
2856
2856
  ep_channels = app.escalation_policy.channels
2857
2857
  email = ep_channels.email
2858
2858
  slack = ep_channels.slack_user_group[0].handle