qontract-reconcile 0.10.2.dev38__py3-none-any.whl → 0.10.2.dev39__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.4
2
2
  Name: qontract-reconcile
3
- Version: 0.10.2.dev38
3
+ Version: 0.10.2.dev39
4
4
  Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
5
5
  Project-URL: homepage, https://github.com/app-sre/qontract-reconcile
6
6
  Project-URL: repository, https://github.com/app-sre/qontract-reconcile
@@ -46,7 +46,7 @@ reconcile/jenkins_roles.py,sha256=HadmoNhgOoKMFZJmCe_Gdg0_a9k_1MuOXidtr801nUU,45
46
46
  reconcile/jenkins_webhooks.py,sha256=dzMT1ywXjeAo5sHj-ittW06Ed3beAUPjnc_oCAtD-Rg,2150
47
47
  reconcile/jenkins_webhooks_cleaner.py,sha256=JsN_NVPfZJwv1JtSzZXDIHUqGiefL-DRffFnDGau9aY,1539
48
48
  reconcile/jenkins_worker_fleets.py,sha256=L2wEXpd4xuEHrXGss4iH788nG8UlLSYduZe1EY2IVw4,5377
49
- reconcile/jira_permissions_validator.py,sha256=DCKUyaqwUcIN4BuNtdREQW44K9yFxa1RUuA8a-dzXFE,13336
49
+ reconcile/jira_permissions_validator.py,sha256=Sw7l-EMHwPk5HXA0LqOs2vmvDd-zraVHouUX1Ak2cVM,13524
50
50
  reconcile/jira_watcher.py,sha256=L_UL2MKm2SoIGNsCLThm28pnqCkoFc154JWsD6bURug,3593
51
51
  reconcile/ldap_users.py,sha256=7hdO5CAPl-VNBvDRmKHg13LoblHXXPt7YEKNGomAoGg,3158
52
52
  reconcile/mr_client_gateway.py,sha256=WhjMd-sIXDFCV8-rt8CEjurJ5OYB1pOD0K3o0tZRXQg,1885
@@ -773,7 +773,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
773
773
  tools/saas_promotion_state/saas_promotion_state.py,sha256=UfwwRLS5Ya4_Nh1w5n1dvoYtchQvYE9yj1VANt2IKqI,3925
774
774
  tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
775
775
  tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
776
- qontract_reconcile-0.10.2.dev38.dist-info/METADATA,sha256=YJv3o5j9e942RRf35TXd_ZICybLaOgLgeRCBuEHtfO0,24665
777
- qontract_reconcile-0.10.2.dev38.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
778
- qontract_reconcile-0.10.2.dev38.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
779
- qontract_reconcile-0.10.2.dev38.dist-info/RECORD,,
776
+ qontract_reconcile-0.10.2.dev39.dist-info/METADATA,sha256=qNWXDceNJDCX6MHXiNnvS4CYUjAhGUt88jYj9js7f0A,24665
777
+ qontract_reconcile-0.10.2.dev39.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
778
+ qontract_reconcile-0.10.2.dev39.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
779
+ qontract_reconcile-0.10.2.dev39.dist-info/RECORD,,
@@ -2,7 +2,7 @@ import logging
2
2
  import random
3
3
  import sys
4
4
  import time
5
- from collections.abc import Callable, Iterable
5
+ from collections.abc import Callable, Iterable, Sequence
6
6
  from enum import IntFlag, auto
7
7
  from typing import Any, TypedDict
8
8
 
@@ -199,7 +199,7 @@ def validate_boards(
199
199
  metrics_container: metrics.MetricsContainer,
200
200
  secret_reader: SecretReaderBase,
201
201
  jira_client_settings: JiraWatcherSettings | None,
202
- jira_boards: Iterable[JiraBoardV1],
202
+ jira_boards: Sequence[JiraBoardV1],
203
203
  default_issue_type: str,
204
204
  default_reopen_state: str,
205
205
  board_check_interval_sec: int,
@@ -211,9 +211,14 @@ def validate_boards(
211
211
  jira_clients: dict[str, JiraClient] = {}
212
212
  for board in jira_boards:
213
213
  next_run_time = state.get(board.name, 0)
214
- if not dry_run and time.time() <= next_run_time:
215
- logging.debug(f"[{board.name}] Skipping board")
216
- continue
214
+ if time.time() <= next_run_time:
215
+ if not dry_run:
216
+ # always skip for non-dry-run mode
217
+ continue
218
+ # dry-run mode
219
+ elif len(jira_boards) > 1:
220
+ logging.info(f"[{board.name}] Use cache results. Skipping ...")
221
+ continue
217
222
 
218
223
  logging.debug(f"[{board.name}] checking ...")
219
224
  if board.server.server_url not in jira_clients: