Skip to content

Commit d0fe2bc

Browse files
committed
supervisor: Initialize kerberos tickets for process-issue
We also need a kerberos ticket when processing issues, since we now pass the errata information to the testing-analyst.
1 parent ccd81c9 commit d0fe2bc

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

supervisor/main.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ def collect(
117117
@with_http_sessions()
118118
async def process_once(queue: WorkQueue):
119119
work_item = await queue.wait_first_ready_work_item()
120+
121+
# Calling this on every work item is a little inefficient, but it makes
122+
# sure that we'll get a new ticket if the old one expires.
123+
await init_kerberos_ticket()
124+
120125
if work_item.item_type == WorkItemType.PROCESS_ISSUE:
121126
issue = get_issue(work_item.item_data, full=True)
122127
result = await IssueHandler(issue, dry_run=app_state.dry_run).run()
@@ -132,10 +137,6 @@ async def process_once(queue: WorkQueue):
132137
result.reschedule_in if result.reschedule_in >= 0 else "never",
133138
)
134139
elif work_item.item_type == WorkItemType.PROCESS_ERRATUM:
135-
# Calling this on every work item is a little inefficient, but it makes
136-
# sure that we'll get a new ticket if the old one expires.
137-
await init_kerberos_ticket()
138-
139140
erratum = get_erratum(work_item.item_data)
140141
result = await ErratumHandler(erratum, dry_run=app_state.dry_run).run()
141142
if result.reschedule_in >= 0:
@@ -175,6 +176,8 @@ def process(repeat: bool = typer.Option(True)):
175176

176177
@with_http_sessions()
177178
async def do_process_issue(key: str):
179+
await init_kerberos_ticket()
180+
178181
issue = get_issue(key, full=True)
179182
result = await IssueHandler(issue, dry_run=app_state.dry_run).run()
180183
logger.info(

0 commit comments

Comments
 (0)