qontract-reconcile 0.10.1rc878__py3-none-any.whl → 0.10.1rc880__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.1rc878.dist-info → qontract_reconcile-0.10.1rc880.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc878.dist-info → qontract_reconcile-0.10.1rc880.dist-info}/RECORD +16 -16
- reconcile/glitchtip/integration.py +3 -3
- reconcile/glitchtip_project_alerts/integration.py +4 -4
- reconcile/glitchtip_project_dsn/integration.py +4 -4
- reconcile/gql_definitions/common/saas_files.py +3 -0
- reconcile/gql_definitions/common/saas_target_namespaces.py +1 -0
- reconcile/gql_definitions/fragments/saas_target_namespace.py +1 -0
- reconcile/gql_definitions/glitchtip/glitchtip_project.py +4 -4
- reconcile/gql_definitions/glitchtip_project_alerts/glitchtip_project.py +2 -2
- reconcile/test/test_saasherder.py +5 -2
- reconcile/utils/saasherder/interfaces.py +1 -0
- reconcile/utils/saasherder/saasherder.py +13 -0
- {qontract_reconcile-0.10.1rc878.dist-info → qontract_reconcile-0.10.1rc880.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc878.dist-info → qontract_reconcile-0.10.1rc880.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc878.dist-info → qontract_reconcile-0.10.1rc880.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc878.dist-info → qontract_reconcile-0.10.1rc880.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.1rc880
|
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.1rc878.dist-info → qontract_reconcile-0.10.1rc880.dist-info}/RECORD
RENAMED
@@ -194,12 +194,12 @@ reconcile/external_resources/reconciler.py,sha256=E50X_lnOD0OWYXMzyZld1P6dCFJFYj
|
|
194
194
|
reconcile/external_resources/secrets_sync.py,sha256=xFQ_ObWl29btbxzEJSkndvHBPcsVpSTkmUlWcUGzZ70,15132
|
195
195
|
reconcile/external_resources/state.py,sha256=fA_CzT4oNie4wnaImwW-W1duWEOKFyS1omcnMyYwx2Q,9644
|
196
196
|
reconcile/glitchtip/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
197
|
-
reconcile/glitchtip/integration.py,sha256=
|
197
|
+
reconcile/glitchtip/integration.py,sha256=SCfdllg0cywCyLKCA66yUm9Z_Sb8t5E0jDEKdwRk6HI,8372
|
198
198
|
reconcile/glitchtip/reconciler.py,sha256=nUvDv7qG1ly0cA16MmlL6NV71yl1mJYLT2mui7lmi0Y,12402
|
199
199
|
reconcile/glitchtip_project_alerts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
200
|
-
reconcile/glitchtip_project_alerts/integration.py,sha256=
|
200
|
+
reconcile/glitchtip_project_alerts/integration.py,sha256=HI_HgvTTc2K-8Md0SpEBs6tOZ3CQm-AbOatbw_NrKqg,12425
|
201
201
|
reconcile/glitchtip_project_dsn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
202
|
-
reconcile/glitchtip_project_dsn/integration.py,sha256=
|
202
|
+
reconcile/glitchtip_project_dsn/integration.py,sha256=5c8RVIO3Wjz2kBfB52EmxZ6VP2JQ1rLGMM9lybNhdAE,8109
|
203
203
|
reconcile/gql_definitions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
204
204
|
reconcile/gql_definitions/acs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
205
205
|
reconcile/gql_definitions/acs/acs_instances.py,sha256=L91WW9LbhJbBSrECqShQpFtjoBOsmNIYLRpMbx1io5o,2181
|
@@ -258,8 +258,8 @@ reconcile/gql_definitions/common/pgp_reencryption_settings.py,sha256=NPLmO6J-zSu
|
|
258
258
|
reconcile/gql_definitions/common/pipeline_providers.py,sha256=JJgmmghqLIwjKOdcWYHPnf4PDgAq4GF7046i0ozrqgI,9127
|
259
259
|
reconcile/gql_definitions/common/quay_instances.py,sha256=toBkdYYVTmEafezAHZKgaW-mQ29xEW6jeronzsAlNyI,1786
|
260
260
|
reconcile/gql_definitions/common/reserved_networks.py,sha256=yP9qSQCaSQcva-ZgTnZp09qH27ur5_qK080ToIs04MY,2560
|
261
|
-
reconcile/gql_definitions/common/saas_files.py,sha256=
|
262
|
-
reconcile/gql_definitions/common/saas_target_namespaces.py,sha256=
|
261
|
+
reconcile/gql_definitions/common/saas_files.py,sha256=8JoysSi-lAjsdGKTK3YBTBPYy95B47guXzfp71JHh1I,16516
|
262
|
+
reconcile/gql_definitions/common/saas_target_namespaces.py,sha256=4VYP2VbwY8WVwtSFk2-jsUNhSmRD3X4FWKxetOKvmd0,2835
|
263
263
|
reconcile/gql_definitions/common/saasherder_settings.py,sha256=nqQLcMwYxLseqq0BEcVvmrpIj2eQq0h8XDSpLN6GGCw,1793
|
264
264
|
reconcile/gql_definitions/common/slack_workspaces.py,sha256=2o0kgi4QiaRuNmZJnc_By4F6NsKIdRaXkrufRQw7Nok,1753
|
265
265
|
reconcile/gql_definitions/common/smtp_client_settings.py,sha256=JU6t6D-Qj-z1gLlgUiHKe0W7AxWQdty9jlv-ig_43tM,2248
|
@@ -299,7 +299,7 @@ reconcile/gql_definitions/fragments/prometheus_instance.py,sha256=12ltnV9kdEw6Ln
|
|
299
299
|
reconcile/gql_definitions/fragments/resource_limits_requirements.py,sha256=ucskQ_a8RxvFl5-IWxz5kk3g4-5Pvh_W4N3nLmuKxi0,744
|
300
300
|
reconcile/gql_definitions/fragments/resource_requests_requirements.py,sha256=TFKO4YALFPanSvZvIJFz0dCioBU7i73Q6hkDtGMvs9I,736
|
301
301
|
reconcile/gql_definitions/fragments/resource_values.py,sha256=-N2lNRhWp8PgocmIeX3U9f3l90Q97N2lXoq1pXdb_LE,742
|
302
|
-
reconcile/gql_definitions/fragments/saas_target_namespace.py,sha256=
|
302
|
+
reconcile/gql_definitions/fragments/saas_target_namespace.py,sha256=8kMXeD7u2bmdjn10zHmMJ80ScOhUp6KqSfWfjWZW-40,4001
|
303
303
|
reconcile/gql_definitions/fragments/terraform_state.py,sha256=S5QuTR9YlvUObiU7hevS9ybxZEssWoRGqCR9YtGwePs,1024
|
304
304
|
reconcile/gql_definitions/fragments/upgrade_policy.py,sha256=cVza8zfra1E3yBsHiS-hKbys17fvv572GFnKshJjluE,1246
|
305
305
|
reconcile/gql_definitions/fragments/user.py,sha256=84RGYYSYnZmyrwHlCX89-EgAu7UaLFOTMQXobmHCfz8,939
|
@@ -309,9 +309,9 @@ reconcile/gql_definitions/gitlab_members/gitlab_instances.py,sha256=oYPvfiOsPTGH
|
|
309
309
|
reconcile/gql_definitions/gitlab_members/permissions.py,sha256=Qzj3Fpv7xj8v9eygeP312nHRNg8er8XMRBveynPIyQM,3302
|
310
310
|
reconcile/gql_definitions/glitchtip/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
311
311
|
reconcile/gql_definitions/glitchtip/glitchtip_instance.py,sha256=QUfLhRkdE_-SorWgLBB8LHFD6kihbFwEoVByCLax3yM,2781
|
312
|
-
reconcile/gql_definitions/glitchtip/glitchtip_project.py,sha256=
|
312
|
+
reconcile/gql_definitions/glitchtip/glitchtip_project.py,sha256=AojrkCDGbVjY0TOkfookz-9tqLA9txY7_xNdsWe174c,6004
|
313
313
|
reconcile/gql_definitions/glitchtip_project_alerts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
314
|
-
reconcile/gql_definitions/glitchtip_project_alerts/glitchtip_project.py,sha256=
|
314
|
+
reconcile/gql_definitions/glitchtip_project_alerts/glitchtip_project.py,sha256=pnkysdaQtdiVVxz9s7V8qttFygqcXOuXREd4LF7tCW8,4466
|
315
315
|
reconcile/gql_definitions/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
316
316
|
reconcile/gql_definitions/integrations/integrations.py,sha256=LfpgVbCCCk20ohwP5pDea5fwxMFGrcgE6J_WHBuGqek,11595
|
317
317
|
reconcile/gql_definitions/jenkins_configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -535,7 +535,7 @@ reconcile/test/test_quay_repos.py,sha256=TdkcRF_a8PLp01Kti9eZZN-vGup2yPBT4Iba3k0
|
|
535
535
|
reconcile/test/test_queries.py,sha256=SpH3RmNpBjEr_ne3VjAMCgKK8RE1z1zo7bypkT5uoO4,1946
|
536
536
|
reconcile/test/test_repo_owners.py,sha256=uRYMLbMmh-9usF0TerabZTZV-Z1CS4I6ybT-LQqCLe8,1423
|
537
537
|
reconcile/test/test_requests_sender.py,sha256=7fd9C2kEFS0-CYtlsif66N1kO9c44pzuBPAJKR9igqU,5385
|
538
|
-
reconcile/test/test_saasherder.py,sha256=
|
538
|
+
reconcile/test/test_saasherder.py,sha256=C2vwkdjk2cccS14GML2ByG8WKcRP8wgTJfzwaEUKdtw,54603
|
539
539
|
reconcile/test/test_saasherder_allowed_secret_paths.py,sha256=5NHQwNJO66at6HiyMZ5sVRTQDwxdvlOQo0KmkBWCw5Q,4853
|
540
540
|
reconcile/test/test_secret_reader.py,sha256=kz7nzcPjvA08cytnvcA_PMA98AEyqJWsESkYeRn5xCk,4994
|
541
541
|
reconcile/test/test_slack_base.py,sha256=gpbWOLNxMMX6fyAbs1JakhLTnwfedb3f7WpUae4tQZE,5060
|
@@ -787,9 +787,9 @@ reconcile/utils/runtime/meta.py,sha256=X44HzyXIBprf3zcsGr2XLCgoeFkz6r3U2nlFXM1H7
|
|
787
787
|
reconcile/utils/runtime/runner.py,sha256=72cc-I6yXyPov8UCLHpyERRy1eiMLpGite2roO0yUlo,7979
|
788
788
|
reconcile/utils/runtime/sharding.py,sha256=roCdbnBklhTK_g34zbgQYqzpKPaNQ8J6Xd9XLO9-t6Q,16258
|
789
789
|
reconcile/utils/saasherder/__init__.py,sha256=J3MBZBFa5YmhqYm08QsjBXz8mFcVOCiOCkyIcw41t7E,343
|
790
|
-
reconcile/utils/saasherder/interfaces.py,sha256=
|
790
|
+
reconcile/utils/saasherder/interfaces.py,sha256=UG3O5zuamNrP1bgbfhQAtNfN_8W9_iSv7UBESnR-mXE,9363
|
791
791
|
reconcile/utils/saasherder/models.py,sha256=iLQZGXMx4FYnK62MJKkVp1T32BpsZ88NOcU7RW0WyAk,5579
|
792
|
-
reconcile/utils/saasherder/saasherder.py,sha256=
|
792
|
+
reconcile/utils/saasherder/saasherder.py,sha256=boCEscTR7Vu6Zjjd7pJIQDO5B_gYiOljwgBa_KDUVLM,88141
|
793
793
|
reconcile/utils/terraform/__init__.py,sha256=zNbiyTWo35AT1sFTElL2j_AA0jJ_yWE_bfFn-nD2xik,250
|
794
794
|
reconcile/utils/terraform/config.py,sha256=5UVrd563TMcvi4ooa5JvWVDW1I3bIWg484u79evfV_8,164
|
795
795
|
reconcile/utils/terraform/config_client.py,sha256=py-Ree-QUYD6Hvng6bM40VgSuttteehIKNgwOSoJO1o,4706
|
@@ -837,8 +837,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
837
837
|
tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jrss,4941
|
838
838
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
839
839
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
840
|
-
qontract_reconcile-0.10.
|
841
|
-
qontract_reconcile-0.10.
|
842
|
-
qontract_reconcile-0.10.
|
843
|
-
qontract_reconcile-0.10.
|
844
|
-
qontract_reconcile-0.10.
|
840
|
+
qontract_reconcile-0.10.1rc880.dist-info/METADATA,sha256=ILC7PTRwvnvvSHK3u1ku0vZpYEjG0uz5cAXZrSYr2w0,2273
|
841
|
+
qontract_reconcile-0.10.1rc880.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
842
|
+
qontract_reconcile-0.10.1rc880.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
|
843
|
+
qontract_reconcile-0.10.1rc880.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
844
|
+
qontract_reconcile-0.10.1rc880.dist-info/RECORD,,
|
@@ -19,7 +19,7 @@ from reconcile.gql_definitions.glitchtip.glitchtip_project import (
|
|
19
19
|
DEFINITION as GLITCHTIP_PROJECT_DEFINITION,
|
20
20
|
)
|
21
21
|
from reconcile.gql_definitions.glitchtip.glitchtip_project import (
|
22
|
-
|
22
|
+
GlitchtipProjectV1,
|
23
23
|
RoleV1,
|
24
24
|
)
|
25
25
|
from reconcile.gql_definitions.glitchtip.glitchtip_project import (
|
@@ -87,7 +87,7 @@ def fetch_current_state(
|
|
87
87
|
|
88
88
|
|
89
89
|
def fetch_desired_state(
|
90
|
-
glitchtip_projects: Sequence[
|
90
|
+
glitchtip_projects: Sequence[GlitchtipProjectV1],
|
91
91
|
mail_domain: str,
|
92
92
|
internal_groups_client: InternalGroupsClient,
|
93
93
|
) -> list[Organization]:
|
@@ -143,7 +143,7 @@ def fetch_desired_state(
|
|
143
143
|
return list(organizations.values())
|
144
144
|
|
145
145
|
|
146
|
-
def get_glitchtip_projects(query_func: Callable) -> list[
|
146
|
+
def get_glitchtip_projects(query_func: Callable) -> list[GlitchtipProjectV1]:
|
147
147
|
glitchtip_projects = (
|
148
148
|
glitchtip_project_query(query_func=query_func).glitchtip_projects or []
|
149
149
|
)
|
@@ -18,7 +18,7 @@ from reconcile.gql_definitions.glitchtip_project_alerts.glitchtip_project import
|
|
18
18
|
GlitchtipProjectAlertRecipientEmailV1,
|
19
19
|
GlitchtipProjectAlertRecipientV1,
|
20
20
|
GlitchtipProjectAlertRecipientWebhookV1,
|
21
|
-
|
21
|
+
GlitchtipProjectV1,
|
22
22
|
)
|
23
23
|
from reconcile.gql_definitions.glitchtip_project_alerts.glitchtip_project import (
|
24
24
|
query as glitchtip_project_query,
|
@@ -73,7 +73,7 @@ class GlitchtipProjectAlertsIntegration(
|
|
73
73
|
def get_early_exit_desired_state(self) -> Optional[dict[str, Any]]:
|
74
74
|
return {"projects": [c.dict() for c in self.get_projects(gql.get_api().query)]}
|
75
75
|
|
76
|
-
def get_projects(self, query_func: Callable) -> list[
|
76
|
+
def get_projects(self, query_func: Callable) -> list[GlitchtipProjectV1]:
|
77
77
|
return glitchtip_project_query(query_func=query_func).glitchtip_projects or []
|
78
78
|
|
79
79
|
def _build_project_alert_recipient(
|
@@ -95,7 +95,7 @@ class GlitchtipProjectAlertsIntegration(
|
|
95
95
|
|
96
96
|
def fetch_desired_state(
|
97
97
|
self,
|
98
|
-
glitchtip_projects: Iterable[
|
98
|
+
glitchtip_projects: Iterable[GlitchtipProjectV1],
|
99
99
|
gjb_alert_url: str | None,
|
100
100
|
gjb_token: str | None,
|
101
101
|
) -> list[Organization]:
|
@@ -264,7 +264,7 @@ class GlitchtipProjectAlertsIntegration(
|
|
264
264
|
glitchtip_instances = glitchtip_instance_query(
|
265
265
|
query_func=gqlapi.query
|
266
266
|
).instances
|
267
|
-
glitchtip_projects_by_instance: dict[str, list[
|
267
|
+
glitchtip_projects_by_instance: dict[str, list[GlitchtipProjectV1]] = (
|
268
268
|
defaultdict(list)
|
269
269
|
)
|
270
270
|
for glitchtip_project in self.get_projects(query_func=gqlapi.query):
|
@@ -20,7 +20,7 @@ from reconcile.gql_definitions.glitchtip.glitchtip_instance import (
|
|
20
20
|
from reconcile.gql_definitions.glitchtip.glitchtip_project import (
|
21
21
|
DEFINITION as GLITCHTIP_PROJECT_DEFINITION,
|
22
22
|
)
|
23
|
-
from reconcile.gql_definitions.glitchtip.glitchtip_project import
|
23
|
+
from reconcile.gql_definitions.glitchtip.glitchtip_project import GlitchtipProjectV1
|
24
24
|
from reconcile.gql_definitions.glitchtip.glitchtip_project import (
|
25
25
|
query as glitchtip_project_query,
|
26
26
|
)
|
@@ -73,7 +73,7 @@ def glitchtip_project_dsn_secret(project: Project, key: ProjectKey) -> dict[str,
|
|
73
73
|
|
74
74
|
|
75
75
|
def fetch_current_state(
|
76
|
-
project:
|
76
|
+
project: GlitchtipProjectV1,
|
77
77
|
oc_map: OCMap,
|
78
78
|
ri: ResourceInventory,
|
79
79
|
) -> None:
|
@@ -110,7 +110,7 @@ def fetch_current_state(
|
|
110
110
|
|
111
111
|
|
112
112
|
def fetch_desired_state(
|
113
|
-
glitchtip_projects: Iterable[
|
113
|
+
glitchtip_projects: Iterable[GlitchtipProjectV1],
|
114
114
|
ri: ResourceInventory,
|
115
115
|
glitchtip_client: GlitchtipClient,
|
116
116
|
) -> None:
|
@@ -145,7 +145,7 @@ def fetch_desired_state(
|
|
145
145
|
)
|
146
146
|
|
147
147
|
|
148
|
-
def projects_query(query_func: Callable) -> list[
|
148
|
+
def projects_query(query_func: Callable) -> list[GlitchtipProjectV1]:
|
149
149
|
glitchtip_projects = []
|
150
150
|
for project in (
|
151
151
|
glitchtip_project_query(query_func=query_func).glitchtip_projects or []
|
@@ -84,6 +84,7 @@ fragment SaasTargetNamespace on Namespace_v1 {
|
|
84
84
|
}
|
85
85
|
codeComponents {
|
86
86
|
url
|
87
|
+
blockedVersions
|
87
88
|
hotfixVersions
|
88
89
|
}
|
89
90
|
}
|
@@ -143,6 +144,7 @@ query SaasFiles {
|
|
143
144
|
}
|
144
145
|
codeComponents {
|
145
146
|
url
|
147
|
+
blockedVersions
|
146
148
|
hotfixVersions
|
147
149
|
}
|
148
150
|
}
|
@@ -330,6 +332,7 @@ class OwnerV1(ConfiguredBaseModel):
|
|
330
332
|
|
331
333
|
class AppCodeComponentsV1(ConfiguredBaseModel):
|
332
334
|
url: str = Field(..., alias="url")
|
335
|
+
blocked_versions: Optional[list[str]] = Field(..., alias="blockedVersions")
|
333
336
|
hotfix_versions: Optional[list[str]] = Field(..., alias="hotfixVersions")
|
334
337
|
|
335
338
|
|
@@ -54,6 +54,7 @@ class OwnerV1(ConfiguredBaseModel):
|
|
54
54
|
|
55
55
|
class AppCodeComponentsV1(ConfiguredBaseModel):
|
56
56
|
url: str = Field(..., alias="url")
|
57
|
+
blocked_versions: Optional[list[str]] = Field(..., alias="blockedVersions")
|
57
58
|
hotfix_versions: Optional[list[str]] = Field(..., alias="hotfixVersions")
|
58
59
|
|
59
60
|
|
@@ -143,7 +143,7 @@ class GlitchtipInstanceV1(ConfiguredBaseModel):
|
|
143
143
|
name: str = Field(..., alias="name")
|
144
144
|
|
145
145
|
|
146
|
-
class
|
146
|
+
class GlitchtipProjectV1_GlitchtipOrganizationV1(ConfiguredBaseModel):
|
147
147
|
name: str = Field(..., alias="name")
|
148
148
|
instance: GlitchtipInstanceV1 = Field(..., alias="instance")
|
149
149
|
owners: Optional[list[str]] = Field(..., alias="owners")
|
@@ -180,19 +180,19 @@ class AppV1(ConfiguredBaseModel):
|
|
180
180
|
path: str = Field(..., alias="path")
|
181
181
|
|
182
182
|
|
183
|
-
class
|
183
|
+
class GlitchtipProjectV1(ConfiguredBaseModel):
|
184
184
|
name: str = Field(..., alias="name")
|
185
185
|
platform: str = Field(..., alias="platform")
|
186
186
|
project_id: Optional[str] = Field(..., alias="projectId")
|
187
187
|
event_throttle_rate: Optional[int] = Field(..., alias="eventThrottleRate")
|
188
188
|
teams: list[GlitchtipTeamV1] = Field(..., alias="teams")
|
189
|
-
organization:
|
189
|
+
organization: GlitchtipProjectV1_GlitchtipOrganizationV1 = Field(..., alias="organization")
|
190
190
|
namespaces: list[NamespaceV1] = Field(..., alias="namespaces")
|
191
191
|
app: Optional[AppV1] = Field(..., alias="app")
|
192
192
|
|
193
193
|
|
194
194
|
class ProjectsQueryData(ConfiguredBaseModel):
|
195
|
-
glitchtip_projects: Optional[list[
|
195
|
+
glitchtip_projects: Optional[list[GlitchtipProjectV1]] = Field(..., alias="glitchtip_projects")
|
196
196
|
|
197
197
|
|
198
198
|
def query(query_func: Callable, **kwargs: Any) -> ProjectsQueryData:
|
@@ -122,7 +122,7 @@ class GlitchtipProjectJiraV1(ConfiguredBaseModel):
|
|
122
122
|
labels: Optional[list[str]] = Field(..., alias="labels")
|
123
123
|
|
124
124
|
|
125
|
-
class
|
125
|
+
class GlitchtipProjectV1(ConfiguredBaseModel):
|
126
126
|
name: str = Field(..., alias="name")
|
127
127
|
project_id: Optional[str] = Field(..., alias="projectId")
|
128
128
|
organization: GlitchtipOrganizationV1 = Field(..., alias="organization")
|
@@ -131,7 +131,7 @@ class GlitchtipProjectsV1(ConfiguredBaseModel):
|
|
131
131
|
|
132
132
|
|
133
133
|
class GlitchtipProjectsWithAlertsQueryData(ConfiguredBaseModel):
|
134
|
-
glitchtip_projects: Optional[list[
|
134
|
+
glitchtip_projects: Optional[list[GlitchtipProjectV1]] = Field(..., alias="glitchtip_projects")
|
135
135
|
|
136
136
|
|
137
137
|
def query(query_func: Callable, **kwargs: Any) -> GlitchtipProjectsWithAlertsQueryData:
|
@@ -1354,7 +1354,7 @@ class TestRemoveNoneAttributes(TestCase):
|
|
1354
1354
|
|
1355
1355
|
|
1356
1356
|
@pytest.mark.usefixtures("inject_gql_class_factory")
|
1357
|
-
class
|
1357
|
+
class TestPromotionBlockedHoxfixVersions(TestCase):
|
1358
1358
|
def setUp(self) -> None:
|
1359
1359
|
self.saas_file = self.gql_class_factory( # type: ignore[attr-defined] # it's set in the fixture
|
1360
1360
|
SaasFile,
|
@@ -1382,7 +1382,7 @@ class TestPromotionHoxfixVersions(TestCase):
|
|
1382
1382
|
self.state_patcher.stop()
|
1383
1383
|
self.promotion_state_patcher.stop()
|
1384
1384
|
|
1385
|
-
def
|
1385
|
+
def test_blocked_hotfix_version_promotion_validity(self) -> None:
|
1386
1386
|
code_component_url = "https://github.com/app-sre/test-saas-deployments"
|
1387
1387
|
hotfix_version = "1234567890123456789012345678901234567890"
|
1388
1388
|
# code_component = self.saas_file.app.code_components[0]
|
@@ -1408,6 +1408,9 @@ class TestPromotionHoxfixVersions(TestCase):
|
|
1408
1408
|
self.saasherder.hotfix_versions[code_component_url] = {hotfix_version}
|
1409
1409
|
self.assertTrue(self.saasherder.validate_promotions())
|
1410
1410
|
|
1411
|
+
self.saasherder.blocked_versions[code_component_url] = {hotfix_version}
|
1412
|
+
self.assertFalse(self.saasherder.validate_promotions())
|
1413
|
+
|
1411
1414
|
|
1412
1415
|
def test_render_templated_parameters(
|
1413
1416
|
gql_class_factory: Callable[..., SaasFileInterface],
|
@@ -150,6 +150,7 @@ class SaasHerder: # pylint: disable=too-many-public-methods
|
|
150
150
|
self._promotion_state = PromotionState(state=state) if state else None
|
151
151
|
self._channel_map = self._assemble_channels(saas_files=all_saas_files)
|
152
152
|
self.images: set[str] = set()
|
153
|
+
self.blocked_versions = self._collect_blocked_versions()
|
153
154
|
self.hotfix_versions = self._collect_hotfix_versions()
|
154
155
|
|
155
156
|
# each namespace is in fact a target,
|
@@ -1100,6 +1101,14 @@ class SaasHerder: # pylint: disable=too-many-public-methods
|
|
1100
1101
|
channel_map[publish].publisher_uids.append(publisher_uid)
|
1101
1102
|
return channel_map
|
1102
1103
|
|
1104
|
+
def _collect_blocked_versions(self) -> dict[str, set[str]]:
|
1105
|
+
blocked_versions: dict[str, set[str]] = {}
|
1106
|
+
for saas_file in self.saas_files:
|
1107
|
+
for cc in saas_file.app.code_components or []:
|
1108
|
+
for v in cc.blocked_versions or []:
|
1109
|
+
blocked_versions.setdefault(cc.url, set()).add(v)
|
1110
|
+
return blocked_versions
|
1111
|
+
|
1103
1112
|
def _collect_hotfix_versions(self) -> dict[str, set[str]]:
|
1104
1113
|
hotfix_versions: dict[str, set[str]] = {}
|
1105
1114
|
for saas_file in self.saas_files:
|
@@ -1899,6 +1908,10 @@ class SaasHerder: # pylint: disable=too-many-public-methods
|
|
1899
1908
|
if not promotion.subscribe:
|
1900
1909
|
return True
|
1901
1910
|
|
1911
|
+
if promotion.commit_sha in self.blocked_versions.get(promotion.url, set()):
|
1912
|
+
logging.error(f"Commit {promotion.commit_sha} is blocked!")
|
1913
|
+
return False
|
1914
|
+
|
1902
1915
|
# hotfix must run before further gates are evaluated to override them
|
1903
1916
|
if promotion.commit_sha in self.hotfix_versions.get(promotion.url, set()):
|
1904
1917
|
return True
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc878.dist-info → qontract_reconcile-0.10.1rc880.dist-info}/top_level.txt
RENAMED
File without changes
|