qontract-reconcile 0.10.1rc730__py3-none-any.whl → 0.10.1rc731__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.1rc730.dist-info → qontract_reconcile-0.10.1rc731.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc730.dist-info → qontract_reconcile-0.10.1rc731.dist-info}/RECORD +7 -7
- reconcile/jira_permissions_validator.py +9 -5
- reconcile/test/test_jira_permissions_validator.py +39 -1
- {qontract_reconcile-0.10.1rc730.dist-info → qontract_reconcile-0.10.1rc731.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc730.dist-info → qontract_reconcile-0.10.1rc731.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc730.dist-info → qontract_reconcile-0.10.1rc731.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc730.dist-info → qontract_reconcile-0.10.1rc731.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.1rc731
|
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.1rc730.dist-info → qontract_reconcile-0.10.1rc731.dist-info}/RECORD
RENAMED
@@ -46,7 +46,7 @@ reconcile/jenkins_roles.py,sha256=f8ELpZY36UjoaCpR_9LijQuIMuB6a7sVLFf_H1ct9Hc,44
|
|
46
46
|
reconcile/jenkins_webhooks.py,sha256=j8vhJMWcRhOdc9XzRSm0CPj84jsF3e4Syjm7r1BIsDE,1978
|
47
47
|
reconcile/jenkins_webhooks_cleaner.py,sha256=JsN_NVPfZJwv1JtSzZXDIHUqGiefL-DRffFnDGau9aY,1539
|
48
48
|
reconcile/jenkins_worker_fleets.py,sha256=PMNGOX0krubFjInPiFT0za0KCiWBLEcVDuXdKRd1BrE,5378
|
49
|
-
reconcile/jira_permissions_validator.py,sha256=
|
49
|
+
reconcile/jira_permissions_validator.py,sha256=8Nl7rSc8x_AXXVRYvRlq_arR7N5pz0YM4M7Pb60RoCg,11597
|
50
50
|
reconcile/jira_watcher.py,sha256=eyOQ92t8TFi6gogfNTO448h_h1CUyr24E0MPHc51R-o,3617
|
51
51
|
reconcile/ldap_users.py,sha256=uEWQ0V41tN9KCZi4ZKPamjrJ6djSpdpvDBo7yJ0e7ZI,3008
|
52
52
|
reconcile/mr_client_gateway.py,sha256=WhjMd-sIXDFCV8-rt8CEjurJ5OYB1pOD0K3o0tZRXQg,1885
|
@@ -451,7 +451,7 @@ reconcile/test/test_gitlab_members.py,sha256=dP_dm-1THba9Vyzcq-EX1tdmBoX2hq8R-MY
|
|
451
451
|
reconcile/test/test_instrumented_wrappers.py,sha256=CZzhnQH0c4i7-Rxjg7-0dfFMvVPegLHL46z5NHOOCwo,608
|
452
452
|
reconcile/test/test_integrations_manager.py,sha256=l6KwSFT0NS9VSR-b_9z_ZEGXDWH3EMitUEMC_1h8Xkk,38184
|
453
453
|
reconcile/test/test_jenkins_worker_fleets.py,sha256=o1jlT7OBBSgu0M3iI4xMdz_x6SciF7yhNBpLk5gTJfg,2361
|
454
|
-
reconcile/test/test_jira_permissions_validator.py,sha256=
|
454
|
+
reconcile/test/test_jira_permissions_validator.py,sha256=zhtAL97IkCyY9R29fDRvDCE1z9S7OVQV7gqu-7Vo5-4,16279
|
455
455
|
reconcile/test/test_jump_host.py,sha256=yczTqvT-hNAf9zBMuFjqka9fQOA31SCNG7D-9K9MRPw,3323
|
456
456
|
reconcile/test/test_ldap_users.py,sha256=8jjzVgoiRRylGad6-TvkugoFGXt3eko--zVVKjmZDn4,3812
|
457
457
|
reconcile/test/test_make.py,sha256=zTdjgq-3idFlec_0qJenk9wWw0QMLvSpJfPsptXmync,677
|
@@ -765,8 +765,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
765
765
|
tools/test/test_qontract_cli.py,sha256=UEwAW7PA_GIrbqzaLxpkCxbuVjEFLNvnVG-6VyoCGIc,4147
|
766
766
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
767
767
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
768
|
-
qontract_reconcile-0.10.
|
769
|
-
qontract_reconcile-0.10.
|
770
|
-
qontract_reconcile-0.10.
|
771
|
-
qontract_reconcile-0.10.
|
772
|
-
qontract_reconcile-0.10.
|
768
|
+
qontract_reconcile-0.10.1rc731.dist-info/METADATA,sha256=sursdK9csIPxAOvipsmyKrcSuaHrms1FagDc5yNyBRI,2382
|
769
|
+
qontract_reconcile-0.10.1rc731.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
770
|
+
qontract_reconcile-0.10.1rc731.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
|
771
|
+
qontract_reconcile-0.10.1rc731.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
772
|
+
qontract_reconcile-0.10.1rc731.dist-info/RECORD,,
|
@@ -166,12 +166,16 @@ def board_is_valid(
|
|
166
166
|
)
|
167
167
|
error |= ValidationError.INVALID_PRIORITY
|
168
168
|
except JIRAError as e:
|
169
|
-
if e.status_code
|
169
|
+
if e.status_code == 401:
|
170
|
+
# sporadic 401 errors, retrying
|
171
|
+
logging.debug(f"[{board.name}] sporadic 401 error! Retry later.")
|
172
|
+
elif e.status_code == 403:
|
173
|
+
logging.error(
|
174
|
+
f"[{board.name}] AppSRE Jira Bot user does not have all necessary permissions. Try granting the user the administrator permissions. API URL: {e.url}"
|
175
|
+
)
|
176
|
+
error |= ValidationError.PERMISSION_ERROR
|
177
|
+
else:
|
170
178
|
raise
|
171
|
-
logging.error(
|
172
|
-
f"[{board.name}] AppSRE Jira Bot user does not have all necessary permissions. Try granting the user the administrator permissions. API URL: {e.url}"
|
173
|
-
)
|
174
|
-
error |= ValidationError.PERMISSION_ERROR
|
175
179
|
|
176
180
|
return error
|
177
181
|
|
@@ -430,7 +430,7 @@ def test_jira_permissions_validator_board_is_valid_exception(
|
|
430
430
|
},
|
431
431
|
)
|
432
432
|
jira_client = mocker.create_autospec(spec=JiraClient)
|
433
|
-
jira_client.can_create_issues.side_effect = JIRAError(status_code=
|
433
|
+
jira_client.can_create_issues.side_effect = JIRAError(status_code=500)
|
434
434
|
with pytest.raises(JIRAError):
|
435
435
|
board_is_valid(
|
436
436
|
jira=jira_client,
|
@@ -440,3 +440,41 @@ def test_jira_permissions_validator_board_is_valid_exception(
|
|
440
440
|
jira_server_priorities={"Minor": "1", "Major": "2", "Critical": "3"},
|
441
441
|
public_projects=[],
|
442
442
|
)
|
443
|
+
|
444
|
+
|
445
|
+
def test_jira_permissions_validator_board_is_valid_exception_401(
|
446
|
+
mocker: MockerFixture, gql_class_factory: Callable
|
447
|
+
) -> None:
|
448
|
+
board = gql_class_factory(
|
449
|
+
JiraBoardV1,
|
450
|
+
{
|
451
|
+
"name": "jira-board-default",
|
452
|
+
"server": {
|
453
|
+
"serverUrl": "https://jira-server.com",
|
454
|
+
"token": {"path": "vault/path/token", "field": "token"},
|
455
|
+
},
|
456
|
+
"issueType": "bug",
|
457
|
+
"issueResolveState": "Closed",
|
458
|
+
"issueReopenState": "Open",
|
459
|
+
"issueSecurityId": "32168",
|
460
|
+
"severityPriorityMappings": {
|
461
|
+
"name": "major-major",
|
462
|
+
"mappings": [
|
463
|
+
{"priority": "Minor"},
|
464
|
+
{"priority": "Major"},
|
465
|
+
{"priority": "Critical"},
|
466
|
+
],
|
467
|
+
},
|
468
|
+
},
|
469
|
+
)
|
470
|
+
jira_client = mocker.create_autospec(spec=JiraClient)
|
471
|
+
jira_client.can_create_issues.side_effect = JIRAError(status_code=401)
|
472
|
+
# no error for 401
|
473
|
+
board_is_valid(
|
474
|
+
jira=jira_client,
|
475
|
+
board=board,
|
476
|
+
default_issue_type="task",
|
477
|
+
default_reopen_state="new",
|
478
|
+
jira_server_priorities={"Minor": "1", "Major": "2", "Critical": "3"},
|
479
|
+
public_projects=[],
|
480
|
+
)
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc730.dist-info → qontract_reconcile-0.10.1rc731.dist-info}/top_level.txt
RENAMED
File without changes
|