qontract-reconcile 0.10.1rc538__py3-none-any.whl → 0.10.1rc540__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.1rc538.dist-info → qontract_reconcile-0.10.1rc540.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc538.dist-info → qontract_reconcile-0.10.1rc540.dist-info}/RECORD +10 -10
- reconcile/glitchtip/integration.py +1 -0
- reconcile/gql_definitions/glitchtip/glitchtip_project.py +2 -0
- reconcile/saas_auto_promotions_manager/merge_request_manager/merge_request_manager_v2.py +5 -2
- reconcile/saas_auto_promotions_manager/merge_request_manager/metrics.py +2 -0
- reconcile/utils/glitchtip/models.py +9 -1
- {qontract_reconcile-0.10.1rc538.dist-info → qontract_reconcile-0.10.1rc540.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc538.dist-info → qontract_reconcile-0.10.1rc540.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc538.dist-info → qontract_reconcile-0.10.1rc540.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc538.dist-info → qontract_reconcile-0.10.1rc540.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.1rc540
|
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.1rc538.dist-info → qontract_reconcile-0.10.1rc540.dist-info}/RECORD
RENAMED
@@ -158,7 +158,7 @@ reconcile/cna/assets/asset.py,sha256=1v51uYSaD1NOc9cI_YxG7h0NOcR1ng-mkmD2UzQ8PXE
|
|
158
158
|
reconcile/cna/assets/asset_factory.py,sha256=7T7X_J6xIsoGETqBRI45_EyIKEdQcnRPt_GAuVuLQcc,785
|
159
159
|
reconcile/cna/assets/null.py,sha256=Fby1Fbn7oNRIGNasdyhRDvXJ0ktpxv-pUAPN0lZWSzk,1684
|
160
160
|
reconcile/glitchtip/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
161
|
-
reconcile/glitchtip/integration.py,sha256=
|
161
|
+
reconcile/glitchtip/integration.py,sha256=te0xjFnovY199nRQeokxQjoOmDKgx-E98mBQykgMVCU,8192
|
162
162
|
reconcile/glitchtip/reconciler.py,sha256=XybVNqXFnrPbNEX_B1B7esqExWdWNsUPXaORMPRUbfk,12333
|
163
163
|
reconcile/glitchtip_project_alerts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
164
164
|
reconcile/glitchtip_project_alerts/integration.py,sha256=Bb4X-oEeBxLQtVJM4TZSerQKgDTknAWO_f-7LZRVGnI,11778
|
@@ -241,7 +241,7 @@ reconcile/gql_definitions/gitlab_members/gitlab_instances.py,sha256=8yOrIN4o0ofZ
|
|
241
241
|
reconcile/gql_definitions/gitlab_members/permissions.py,sha256=Qzj3Fpv7xj8v9eygeP312nHRNg8er8XMRBveynPIyQM,3302
|
242
242
|
reconcile/gql_definitions/glitchtip/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
243
243
|
reconcile/gql_definitions/glitchtip/glitchtip_instance.py,sha256=VLtAz0MQOdioh3K0viBOvDS-irrEFNnvqD6qxwG8n3M,2710
|
244
|
-
reconcile/gql_definitions/glitchtip/glitchtip_project.py,sha256=
|
244
|
+
reconcile/gql_definitions/glitchtip/glitchtip_project.py,sha256=oFijq1LIQysUM-IOyNUjxVZgRD93NK12lNvJuBq4vjE,6008
|
245
245
|
reconcile/gql_definitions/glitchtip_project_alerts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
246
246
|
reconcile/gql_definitions/glitchtip_project_alerts/glitchtip_project.py,sha256=9gtwIyJOuhM6u-aIIsU2KEobG_aoAEhSsIGM-gkFrqM,4201
|
247
247
|
reconcile/gql_definitions/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -350,8 +350,8 @@ reconcile/saas_auto_promotions_manager/publisher.py,sha256=4_M9Oykhj-kEZPUn05E2D
|
|
350
350
|
reconcile/saas_auto_promotions_manager/subscriber.py,sha256=cLhPlkT71J2LIice3SLmH1WpsqzV46gd0peMxrnqyRw,7452
|
351
351
|
reconcile/saas_auto_promotions_manager/merge_request_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
352
352
|
reconcile/saas_auto_promotions_manager/merge_request_manager/merge_request.py,sha256=BeAJWLow7b4HQyZ9zz398sQkPeIz8chpMkCts2NU27c,1282
|
353
|
-
reconcile/saas_auto_promotions_manager/merge_request_manager/merge_request_manager_v2.py,sha256=
|
354
|
-
reconcile/saas_auto_promotions_manager/merge_request_manager/metrics.py,sha256=
|
353
|
+
reconcile/saas_auto_promotions_manager/merge_request_manager/merge_request_manager_v2.py,sha256=awjaelk-1YbuxA-SsamzinDmM820I8TynGkelJe3Uq4,6991
|
354
|
+
reconcile/saas_auto_promotions_manager/merge_request_manager/metrics.py,sha256=sdHp71Wl87tFM-Z_QvqvdHhyrppFLGi4ekksCi_e_bs,977
|
355
355
|
reconcile/saas_auto_promotions_manager/merge_request_manager/mr_parser.py,sha256=x8Gg-YjEFWEeDPJH3Y8SrfcJbwhLuAqCz4kIhfEyaaA,7060
|
356
356
|
reconcile/saas_auto_promotions_manager/merge_request_manager/reconciler.py,sha256=nst5ZynEQs9Hy9Z2DAjN8_ALIS_5XnrbJh7KG4YVRrE,7789
|
357
357
|
reconcile/saas_auto_promotions_manager/merge_request_manager/renderer.py,sha256=huslpgeXNf_VmEVmWHIYYSwEcT67zsbuubYMk2P9ezc,6959
|
@@ -597,7 +597,7 @@ reconcile/utils/cloud_resource_best_practice/__init__.py,sha256=47DEQpj8HBSa-_TI
|
|
597
597
|
reconcile/utils/cloud_resource_best_practice/aws_rds.py,sha256=EvE6XKLsrZ531MJptKqPht2lOETrOjySTHXk6CzMgo0,2279
|
598
598
|
reconcile/utils/glitchtip/__init__.py,sha256=FT6iBhGqoe7KExFdbgL8AYUb64iW_4snF5__Dcl7yt0,258
|
599
599
|
reconcile/utils/glitchtip/client.py,sha256=qLqw-AMrWkdP1c9pguSBjE20W6ux6JCeXCM260uET-s,10396
|
600
|
-
reconcile/utils/glitchtip/models.py,sha256=
|
600
|
+
reconcile/utils/glitchtip/models.py,sha256=fwIo1u3IpLGb353Oy0WW7PY-ROAdYR87TV0hhM2d9Qs,6434
|
601
601
|
reconcile/utils/internal_groups/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
602
602
|
reconcile/utils/internal_groups/client.py,sha256=abREA8RwXKybXFjCK8CAcCr-iUp2r0tAbIEJ-c-PXws,4538
|
603
603
|
reconcile/utils/internal_groups/models.py,sha256=jlkH_hyyyuwS0J1IpuS7W1AyQSKQ2QpHelXoH36edbE,2316
|
@@ -669,8 +669,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
669
669
|
tools/test/test_qontract_cli.py,sha256=se-YG_YVCWRFrnCPvBVHDBT_59CkbIoEni-4SJa8_MU,2755
|
670
670
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
671
671
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
672
|
-
qontract_reconcile-0.10.
|
673
|
-
qontract_reconcile-0.10.
|
674
|
-
qontract_reconcile-0.10.
|
675
|
-
qontract_reconcile-0.10.
|
676
|
-
qontract_reconcile-0.10.
|
672
|
+
qontract_reconcile-0.10.1rc540.dist-info/METADATA,sha256=WNI0hxRRLGZlqygoB1eyLlAcy8BikBAxDbX2dcyKcHM,2349
|
673
|
+
qontract_reconcile-0.10.1rc540.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
674
|
+
qontract_reconcile-0.10.1rc540.dist-info/entry_points.txt,sha256=rTjAv28I_CHLM8ID3OPqMI_suoQ9s7tFbim4aYjn9kk,376
|
675
|
+
qontract_reconcile-0.10.1rc540.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
676
|
+
qontract_reconcile-0.10.1rc540.dist-info/RECORD,,
|
@@ -100,6 +100,7 @@ def fetch_desired_state(
|
|
100
100
|
name=glitchtip_project.name,
|
101
101
|
platform=glitchtip_project.platform,
|
102
102
|
slug=glitchtip_project.project_id if glitchtip_project.project_id else "",
|
103
|
+
event_throttle_rate=glitchtip_project.event_throttle_rate or 0,
|
103
104
|
)
|
104
105
|
# Check project is unique within an organization
|
105
106
|
if project.name in [p.name for p in organization.projects]:
|
@@ -45,6 +45,7 @@ query Projects {
|
|
45
45
|
name
|
46
46
|
platform
|
47
47
|
projectId
|
48
|
+
eventThrottleRate
|
48
49
|
teams {
|
49
50
|
name
|
50
51
|
roles {
|
@@ -183,6 +184,7 @@ class GlitchtipProjectsV1(ConfiguredBaseModel):
|
|
183
184
|
name: str = Field(..., alias="name")
|
184
185
|
platform: str = Field(..., alias="platform")
|
185
186
|
project_id: Optional[str] = Field(..., alias="projectId")
|
187
|
+
event_throttle_rate: Optional[int] = Field(..., alias="eventThrottleRate")
|
186
188
|
teams: list[GlitchtipTeamV1] = Field(..., alias="teams")
|
187
189
|
organization: GlitchtipProjectsV1_GlitchtipOrganizationV1 = Field(..., alias="organization")
|
188
190
|
namespaces: list[NamespaceV1] = Field(..., alias="namespaces")
|
@@ -148,8 +148,6 @@ class MergeRequestManagerV2:
|
|
148
148
|
|
149
149
|
def reconcile(self, subscribers: Iterable[Subscriber]) -> None:
|
150
150
|
current_state = self._mr_parser.retrieve_open_mrs(label=SAPM_LABEL)
|
151
|
-
metrics.set_gauge(ParallelOpenMRGauge(), len(current_state))
|
152
|
-
|
153
151
|
desired_state = self._aggregate_desired_state(subscribers=subscribers)
|
154
152
|
|
155
153
|
diff = self._reconciler.reconcile(
|
@@ -157,6 +155,10 @@ class MergeRequestManagerV2:
|
|
157
155
|
desired_promotions=desired_state,
|
158
156
|
open_mrs=current_state,
|
159
157
|
)
|
158
|
+
parallel_open_mrs = (
|
159
|
+
len(current_state) - len(diff.deletions) + len(diff.additions)
|
160
|
+
)
|
161
|
+
metrics.set_gauge(ParallelOpenMRGauge(), parallel_open_mrs)
|
160
162
|
for deletion in diff.deletions:
|
161
163
|
metrics.inc_counter(
|
162
164
|
MRClosedCounter(
|
@@ -172,6 +174,7 @@ class MergeRequestManagerV2:
|
|
172
174
|
metrics.inc_counter(
|
173
175
|
MROpenedCounter(
|
174
176
|
is_batchable=addition.batchable,
|
177
|
+
batch_size=len(addition.content_hashes),
|
175
178
|
),
|
176
179
|
)
|
177
180
|
self._render_mr(addition=addition)
|
@@ -16,6 +16,8 @@ class SAPMOpenedMRsCounter(SAPMBaseMetric, CounterMetric):
|
|
16
16
|
"Counter for the number of opened auto-promotion MRs"
|
17
17
|
|
18
18
|
is_batchable: bool
|
19
|
+
# We do not expect batches >10, i.e., cardinality will stay in check here.
|
20
|
+
batch_size: int
|
19
21
|
|
20
22
|
@classmethod
|
21
23
|
def name(cls) -> str:
|
@@ -154,6 +154,10 @@ class Project(BaseModel):
|
|
154
154
|
platform: Optional[str]
|
155
155
|
teams: list[Team] = []
|
156
156
|
alerts: list[ProjectAlert] = []
|
157
|
+
event_throttle_rate: int = Field(0, alias="eventThrottleRate")
|
158
|
+
|
159
|
+
class Config:
|
160
|
+
allow_population_by_field_name = True
|
157
161
|
|
158
162
|
@root_validator
|
159
163
|
def slugify( # pylint: disable=no-self-argument
|
@@ -174,7 +178,11 @@ class Project(BaseModel):
|
|
174
178
|
return self.slug == other.slug
|
175
179
|
|
176
180
|
def diff(self, other: Project) -> bool:
|
177
|
-
return
|
181
|
+
return (
|
182
|
+
self.name != other.name
|
183
|
+
or self.platform != other.platform
|
184
|
+
or self.event_throttle_rate != other.event_throttle_rate
|
185
|
+
)
|
178
186
|
|
179
187
|
def __hash__(self) -> int:
|
180
188
|
return hash(self.slug)
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc538.dist-info → qontract_reconcile-0.10.1rc540.dist-info}/top_level.txt
RENAMED
File without changes
|