qontract-reconcile 0.10.1rc533__py3-none-any.whl → 0.10.1rc534__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.1rc533
3
+ Version: 0.10.1rc534
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
@@ -352,8 +352,8 @@ reconcile/saas_auto_promotions_manager/merge_request_manager/__init__.py,sha256=
352
352
  reconcile/saas_auto_promotions_manager/merge_request_manager/merge_request.py,sha256=BeAJWLow7b4HQyZ9zz398sQkPeIz8chpMkCts2NU27c,1282
353
353
  reconcile/saas_auto_promotions_manager/merge_request_manager/merge_request_manager_v2.py,sha256=Efl4PBOt78UgB-NL_j3_FXabtpQvkJhCEXaHwyspVcE,6006
354
354
  reconcile/saas_auto_promotions_manager/merge_request_manager/mr_parser.py,sha256=x8Gg-YjEFWEeDPJH3Y8SrfcJbwhLuAqCz4kIhfEyaaA,7060
355
- reconcile/saas_auto_promotions_manager/merge_request_manager/reconciler.py,sha256=_gZ0ef-5E9hCdpkSw4b8SdTfpcaTS722KPWey4LhD5I,7644
356
- reconcile/saas_auto_promotions_manager/merge_request_manager/renderer.py,sha256=sNkSKmEA1rgT2R8VNuYuHBjJWa_wpHX3M64LlOb7jB4,6959
355
+ reconcile/saas_auto_promotions_manager/merge_request_manager/reconciler.py,sha256=lxQUJgpwfnzvGZTNpmLOeTSiXzzJta1aSezMF9HRTwg,7734
356
+ reconcile/saas_auto_promotions_manager/merge_request_manager/renderer.py,sha256=huslpgeXNf_VmEVmWHIYYSwEcT67zsbuubYMk2P9ezc,6959
357
357
  reconcile/saas_auto_promotions_manager/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
358
358
  reconcile/saas_auto_promotions_manager/utils/saas_files_inventory.py,sha256=mihuWynroB1Cea1Lsvf6V8Nb8PGiBdcLC0uhCX_52Y0,6966
359
359
  reconcile/skupper_network/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -460,7 +460,7 @@ reconcile/test/saas_auto_promotions_manager/merge_request_manager/merge_request_
460
460
  reconcile/test/saas_auto_promotions_manager/merge_request_manager/merge_request_manager/data_keys.py,sha256=Z1IV51OUuzhd-3S8W-k7ixC-fkaglCokn0eakK0Z73s,606
461
461
  reconcile/test/saas_auto_promotions_manager/merge_request_manager/merge_request_manager/test_merge_request_manager.py,sha256=ryROiiQNtZvuG820CB-RQ9FMmLAGshezyMDNDiJNA_E,2369
462
462
  reconcile/test/saas_auto_promotions_manager/merge_request_manager/merge_request_manager/test_mr_parser.py,sha256=dcGHzxuafKSxmswSO1qF2WlKaqsmEvtERC6Lb8kDAN0,10019
463
- reconcile/test/saas_auto_promotions_manager/merge_request_manager/merge_request_manager/test_reconciler.py,sha256=-rSv-C-JFaY0gsjSFgcXz9ASNQQOzwizaQEbVYJtLHg,14906
463
+ reconcile/test/saas_auto_promotions_manager/merge_request_manager/merge_request_manager/test_reconciler.py,sha256=to7lRzKTqN1cwEcnzDUKPWbIAzffI9jD870en0-zif8,17868
464
464
  reconcile/test/saas_auto_promotions_manager/merge_request_manager/renderer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
465
465
  reconcile/test/saas_auto_promotions_manager/merge_request_manager/renderer/conftest.py,sha256=2rCSstewp4LPoEJHm5N7dGJexEtY8ndLHvoGZYjmpsc,1678
466
466
  reconcile/test/saas_auto_promotions_manager/merge_request_manager/renderer/data_keys.py,sha256=beHYQ9kgDLeBZgC2FvxQA3tHx1PO-RAMN8_kVcSdikI,90
@@ -667,8 +667,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
667
667
  tools/test/test_qontract_cli.py,sha256=d18KrdhtUGqoC7_kWZU128U0-VJEj-0rjFkLVufcI6I,2755
668
668
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
669
669
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
670
- qontract_reconcile-0.10.1rc533.dist-info/METADATA,sha256=phMhK1hKQCVRYHL2fDJ3dk6J0nK58PsNGGBQUfStFdc,2349
671
- qontract_reconcile-0.10.1rc533.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
672
- qontract_reconcile-0.10.1rc533.dist-info/entry_points.txt,sha256=rTjAv28I_CHLM8ID3OPqMI_suoQ9s7tFbim4aYjn9kk,376
673
- qontract_reconcile-0.10.1rc533.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
674
- qontract_reconcile-0.10.1rc533.dist-info/RECORD,,
670
+ qontract_reconcile-0.10.1rc534.dist-info/METADATA,sha256=V0qyziPJ21CkzDNPHeicy8Z76OhLTIP-AQVa0kX-85E,2349
671
+ qontract_reconcile-0.10.1rc534.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
672
+ qontract_reconcile-0.10.1rc534.dist-info/entry_points.txt,sha256=rTjAv28I_CHLM8ID3OPqMI_suoQ9s7tFbim4aYjn9kk,376
673
+ qontract_reconcile-0.10.1rc534.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
674
+ qontract_reconcile-0.10.1rc534.dist-info/RECORD,,
@@ -80,6 +80,7 @@ class Reconciler:
80
80
  desired_promotions_after_unbatching: list[Promotion] = []
81
81
  for promotion in self._desired_promotions:
82
82
  if promotion.content_hashes.issubset(unbatchable_hashes):
83
+ desired_promotions_after_unbatching.append(promotion)
83
84
  continue
84
85
  elif promotion.content_hashes.issubset(falsely_marked_batchable_hashes):
85
86
  diff.additions.append(
@@ -143,7 +144,7 @@ class Reconciler:
143
144
 
144
145
  batch_with_capacity: Optional[OpenMergeRequest] = None
145
146
  for mr in self._open_mrs:
146
- if len(mr.content_hashes) < batch_limit:
147
+ if mr.is_batchable and len(mr.content_hashes) < batch_limit:
147
148
  batch_with_capacity = mr
148
149
  # Note, there should always only be maximum one batch with capacity available
149
150
  break
@@ -19,7 +19,7 @@ from reconcile.saas_auto_promotions_manager.subscriber import Subscriber
19
19
  PROMOTION_DATA_SEPARATOR = (
20
20
  "**SAPM Data - DO NOT MANUALLY CHANGE ANYTHING BELOW THIS LINE**"
21
21
  )
22
- SAPM_VERSION = "2.1.1"
22
+ SAPM_VERSION = "2.1.2"
23
23
  CONTENT_HASHES = "content_hashes"
24
24
  CHANNELS_REF = "channels"
25
25
  IS_BATCHABLE = "is_batchable"
@@ -367,6 +367,94 @@ def _aggregate_channels(items: Sequence[Addition | Deletion]) -> set[str]:
367
367
  ],
368
368
  ),
369
369
  ),
370
+ # We have an unbatchable open MR.
371
+ # We do not want any change on the existing unbatchable MR,
372
+ # but at the same time expect a new MR to be opened for the new promotion.
373
+ (
374
+ [
375
+ Promotion(
376
+ channels={"chan1"},
377
+ content_hashes={"hash1"},
378
+ ),
379
+ Promotion(
380
+ channels={"chan2"},
381
+ content_hashes={"hash2"},
382
+ ),
383
+ ],
384
+ [
385
+ OpenMergeRequest(
386
+ raw=create_autospec(spec=ProjectMergeRequest),
387
+ channels={"chan1"},
388
+ content_hashes={"hash1"},
389
+ failed_mr_check=False,
390
+ is_batchable=False,
391
+ ),
392
+ ],
393
+ Diff(
394
+ deletions=[],
395
+ additions=[
396
+ Addition(
397
+ content_hashes={
398
+ "hash2",
399
+ },
400
+ channels={"chan2"},
401
+ batchable=True,
402
+ ),
403
+ ],
404
+ ),
405
+ ),
406
+ # We have multiple unbatchable open MRs.
407
+ # We do not want any change on the existing unbatchable MRs,
408
+ # but at the same time expect a new MR to be opened for the new promotions.
409
+ (
410
+ [
411
+ Promotion(
412
+ channels={"chan1"},
413
+ content_hashes={"hash1"},
414
+ ),
415
+ Promotion(
416
+ channels={"chan2"},
417
+ content_hashes={"hash2"},
418
+ ),
419
+ Promotion(
420
+ channels={"chan3"},
421
+ content_hashes={"hash3"},
422
+ ),
423
+ Promotion(
424
+ channels={"chan4"},
425
+ content_hashes={"hash4"},
426
+ ),
427
+ ],
428
+ [
429
+ OpenMergeRequest(
430
+ raw=create_autospec(spec=ProjectMergeRequest),
431
+ channels={"chan1"},
432
+ content_hashes={"hash1"},
433
+ failed_mr_check=False,
434
+ is_batchable=False,
435
+ ),
436
+ OpenMergeRequest(
437
+ raw=create_autospec(spec=ProjectMergeRequest),
438
+ channels={"chan2"},
439
+ content_hashes={"hash2"},
440
+ failed_mr_check=False,
441
+ is_batchable=False,
442
+ ),
443
+ ],
444
+ Diff(
445
+ deletions=[],
446
+ additions=[
447
+ Addition(
448
+ content_hashes={
449
+ "hash3",
450
+ "hash4",
451
+ },
452
+ channels={"chan3", "chan4"},
453
+ batchable=True,
454
+ ),
455
+ ],
456
+ ),
457
+ ),
370
458
  ],
371
459
  )
372
460
  def test_reconcile(