qontract-reconcile 0.10.1rc786__py3-none-any.whl → 0.10.1rc788__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.1rc786.dist-info → qontract_reconcile-0.10.1rc788.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc786.dist-info → qontract_reconcile-0.10.1rc788.dist-info}/RECORD +8 -8
- reconcile/external_resources/state.py +1 -1
- reconcile/glitchtip_project_alerts/integration.py +36 -26
- reconcile/gql_definitions/glitchtip_project_alerts/glitchtip_project.py +8 -0
- {qontract_reconcile-0.10.1rc786.dist-info → qontract_reconcile-0.10.1rc788.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc786.dist-info → qontract_reconcile-0.10.1rc788.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc786.dist-info → qontract_reconcile-0.10.1rc788.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc786.dist-info → qontract_reconcile-0.10.1rc788.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.1rc788
|
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.1rc786.dist-info → qontract_reconcile-0.10.1rc788.dist-info}/RECORD
RENAMED
@@ -186,12 +186,12 @@ reconcile/external_resources/metrics.py,sha256=m2TIOao2N7pD6k45driFbBGVCC_N7ai44
|
|
186
186
|
reconcile/external_resources/model.py,sha256=FJUb7rHU2l7YSAv-t4QaacL9pqheFBxhPydWSPqu3vY,7413
|
187
187
|
reconcile/external_resources/reconciler.py,sha256=E50X_lnOD0OWYXMzyZld1P6dCFJFYjHGyICWff9bxlc,9323
|
188
188
|
reconcile/external_resources/secrets_sync.py,sha256=g-ksvzmTlCTwo3PM3FgYXm0LUBcnwfAxcvisuR1jAMY,7982
|
189
|
-
reconcile/external_resources/state.py,sha256=
|
189
|
+
reconcile/external_resources/state.py,sha256=LrZ_-9DRmKOdPlYgxgaYlGAOa6lzKDgcmn-Zc4AQDX0,9333
|
190
190
|
reconcile/glitchtip/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
191
191
|
reconcile/glitchtip/integration.py,sha256=Y7ofQg_xCt3dOln3pjeXp7rAnwohCgD2zcUAb-Hciis,8375
|
192
192
|
reconcile/glitchtip/reconciler.py,sha256=nUvDv7qG1ly0cA16MmlL6NV71yl1mJYLT2mui7lmi0Y,12402
|
193
193
|
reconcile/glitchtip_project_alerts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
194
|
-
reconcile/glitchtip_project_alerts/integration.py,sha256=
|
194
|
+
reconcile/glitchtip_project_alerts/integration.py,sha256=EJBZJldOyK_ECAfgr1RjxabtsVRIBbZcW-7JU4cwVsA,12429
|
195
195
|
reconcile/glitchtip_project_dsn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
196
196
|
reconcile/glitchtip_project_dsn/integration.py,sha256=qt2a33FOUUlCyonSHm3nUb7pNXgLAq8sv_JQCm6Vj3U,8113
|
197
197
|
reconcile/gql_definitions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -297,7 +297,7 @@ reconcile/gql_definitions/glitchtip/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQ
|
|
297
297
|
reconcile/gql_definitions/glitchtip/glitchtip_instance.py,sha256=VLtAz0MQOdioh3K0viBOvDS-irrEFNnvqD6qxwG8n3M,2710
|
298
298
|
reconcile/gql_definitions/glitchtip/glitchtip_project.py,sha256=oFijq1LIQysUM-IOyNUjxVZgRD93NK12lNvJuBq4vjE,6008
|
299
299
|
reconcile/gql_definitions/glitchtip_project_alerts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
300
|
-
reconcile/gql_definitions/glitchtip_project_alerts/glitchtip_project.py,sha256=
|
300
|
+
reconcile/gql_definitions/glitchtip_project_alerts/glitchtip_project.py,sha256=tZhSFb5eIIc5BOgMPQeV9tEwrVu1MnrxaQ5pQ0zEKk4,4468
|
301
301
|
reconcile/gql_definitions/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
302
302
|
reconcile/gql_definitions/integrations/integrations.py,sha256=LfpgVbCCCk20ohwP5pDea5fwxMFGrcgE6J_WHBuGqek,11595
|
303
303
|
reconcile/gql_definitions/jenkins_configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -785,8 +785,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
785
785
|
tools/test/test_qontract_cli.py,sha256=w2l4BHB09k1d-BGJ1jBUNCqDv7zkqYrMHojQXg-21kQ,4155
|
786
786
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
787
787
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
788
|
-
qontract_reconcile-0.10.
|
789
|
-
qontract_reconcile-0.10.
|
790
|
-
qontract_reconcile-0.10.
|
791
|
-
qontract_reconcile-0.10.
|
792
|
-
qontract_reconcile-0.10.
|
788
|
+
qontract_reconcile-0.10.1rc788.dist-info/METADATA,sha256=35KzCcK2CjxIE0CCyx17qxBc0-537HWxpoFAL42iIwI,2364
|
789
|
+
qontract_reconcile-0.10.1rc788.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
790
|
+
qontract_reconcile-0.10.1rc788.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
|
791
|
+
qontract_reconcile-0.10.1rc788.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
792
|
+
qontract_reconcile-0.10.1rc788.dist-info/RECORD,,
|
@@ -224,7 +224,7 @@ class ExternalResourcesStateDynamoDB:
|
|
224
224
|
to check if a resource has been removed from the configuration.
|
225
225
|
Getting less data from DynamoDb saves money and the logic does not need it.
|
226
226
|
"""
|
227
|
-
logging.
|
227
|
+
logging.debug("Getting Managed resources from DynamoDb")
|
228
228
|
partials = {}
|
229
229
|
for item in self.aws_api.dynamodb.boto3_client.scan(
|
230
230
|
TableName=self._table, ProjectionExpression=self.PARTIALS_PROJECTED_VALUES
|
@@ -10,6 +10,7 @@ from typing import (
|
|
10
10
|
)
|
11
11
|
from urllib.parse import urlencode
|
12
12
|
|
13
|
+
from reconcile import jira_permissions_validator
|
13
14
|
from reconcile.gql_definitions.glitchtip.glitchtip_instance import (
|
14
15
|
query as glitchtip_instance_query,
|
15
16
|
)
|
@@ -24,6 +25,7 @@ from reconcile.gql_definitions.glitchtip_project_alerts.glitchtip_project import
|
|
24
25
|
)
|
25
26
|
from reconcile.utils import gql
|
26
27
|
from reconcile.utils.differ import diff_iterables
|
28
|
+
from reconcile.utils.disabled_integrations import integration_is_enabled
|
27
29
|
from reconcile.utils.glitchtip.client import GlitchtipClient
|
28
30
|
from reconcile.utils.glitchtip.models import (
|
29
31
|
Organization,
|
@@ -121,35 +123,43 @@ class GlitchtipProjectAlertsIntegration(
|
|
121
123
|
)
|
122
124
|
)
|
123
125
|
if glitchtip_project.jira and gjb_alert_url:
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
126
|
+
jira_project_key = None
|
127
|
+
if glitchtip_project.jira.project:
|
128
|
+
jira_project_key = glitchtip_project.jira.project
|
129
|
+
elif (
|
130
|
+
glitchtip_project.jira.board
|
131
|
+
and integration_is_enabled(
|
132
|
+
QONTRACT_INTEGRATION, glitchtip_project.jira.board
|
133
|
+
)
|
134
|
+
and integration_is_enabled(
|
135
|
+
jira_permissions_validator.QONTRACT_INTEGRATION,
|
136
|
+
glitchtip_project.jira.board,
|
132
137
|
)
|
138
|
+
):
|
139
|
+
jira_project_key = glitchtip_project.jira.board.name
|
133
140
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
141
|
+
if jira_project_key:
|
142
|
+
params: dict[str, str | list] = {}
|
143
|
+
if gjb_token:
|
144
|
+
params["token"] = gjb_token
|
145
|
+
if glitchtip_project.jira.labels:
|
146
|
+
params["labels"] = glitchtip_project.jira.labels
|
147
|
+
url = (
|
148
|
+
f"{gjb_alert_url}/{jira_project_key}?{urlencode(params, True)}"
|
149
|
+
)
|
150
|
+
alerts.append(
|
151
|
+
ProjectAlert(
|
152
|
+
name=GJB_ALERT_NAME,
|
153
|
+
timespan_minutes=1,
|
154
|
+
quantity=1,
|
155
|
+
recipients=[
|
156
|
+
ProjectAlertRecipient(
|
157
|
+
recipient_type=RecipientType.WEBHOOK,
|
158
|
+
url=url,
|
159
|
+
)
|
160
|
+
],
|
161
|
+
)
|
151
162
|
)
|
152
|
-
)
|
153
163
|
# check for duplicates
|
154
164
|
if not webhook_urls_are_unique(alerts):
|
155
165
|
raise ValueError(
|
@@ -60,6 +60,9 @@ query GlitchtipProjectsWithAlerts {
|
|
60
60
|
project
|
61
61
|
board {
|
62
62
|
name
|
63
|
+
disable {
|
64
|
+
integrations
|
65
|
+
}
|
63
66
|
}
|
64
67
|
labels
|
65
68
|
}
|
@@ -104,8 +107,13 @@ class GlitchtipProjectAlertV1(ConfiguredBaseModel):
|
|
104
107
|
recipients: list[Union[GlitchtipProjectAlertRecipientWebhookV1, GlitchtipProjectAlertRecipientEmailV1, GlitchtipProjectAlertRecipientV1]] = Field(..., alias="recipients")
|
105
108
|
|
106
109
|
|
110
|
+
class DisableJiraBoardAutomationsV1(ConfiguredBaseModel):
|
111
|
+
integrations: Optional[list[str]] = Field(..., alias="integrations")
|
112
|
+
|
113
|
+
|
107
114
|
class JiraBoardV1(ConfiguredBaseModel):
|
108
115
|
name: str = Field(..., alias="name")
|
116
|
+
disable: Optional[DisableJiraBoardAutomationsV1] = Field(..., alias="disable")
|
109
117
|
|
110
118
|
|
111
119
|
class GlitchtipProjectJiraV1(ConfiguredBaseModel):
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc786.dist-info → qontract_reconcile-0.10.1rc788.dist-info}/top_level.txt
RENAMED
File without changes
|