Skip to content

Commit 7b3014e

Browse files
committed
supervisor: Look for Errata Link, not Fixed in Build
Make our "ready to process" state be "Errata Link set" not "Fixed in Build set", otherwise we can run in the state where automation has set Fixed in Build but automation has not yet created an errata. - If we move the issue to Integration at this point, then 'RHEL JIRA Bot" scolds us (https://issues.redhat.com/browse/RHEL-112522) - Our testing analyst may get confused. In the future we'll add tracking for post-merge, pre-ready-to-process so we can catch the case where the errata never gets created.
1 parent d9ce5e9 commit 7b3014e

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

supervisor/issue_handler.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,13 @@ async def run(self) -> WorkflowResult:
6060
"Issue has the jotnar_needs_attention label"
6161
)
6262

63+
if issue.errata_link is None:
64+
return self.resolve_remove_work_item("Issue has no errata_link")
65+
6366
if issue.fixed_in_build is None:
64-
return self.resolve_remove_work_item("Issue has no fixed_in_build")
67+
return self.resolve_flag_attention(
68+
"Issue has errata_link but no fixed_in_build"
69+
)
6570

6671
if issue.preliminary_testing != PreliminaryTesting.PASS:
6772
return self.resolve_flag_attention(
@@ -85,9 +90,7 @@ async def run(self) -> WorkflowResult:
8590
"Preliminary testing has passed, moving to Integration",
8691
)
8792
elif issue.status == IssueStatus.INTEGRATION:
88-
related_erratum = (
89-
get_erratum_for_link(issue.errata_link, full=True) if issue.errata_link else None
90-
)
93+
related_erratum = get_erratum_for_link(issue.errata_link, full=True)
9194
testing_analysis = await analyze_issue(issue, related_erratum)
9295
if testing_analysis.state == TestingState.NOT_RUNNING:
9396
return self.resolve_flag_attention(

supervisor/jira_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def get_custom_fields() -> dict[str, str]:
157157
CURRENT_ISSUES_JQL = """
158158
project = RHEL AND AssignedTeam = rhel-jotnar
159159
AND status in ('New', 'In Progress', 'Integration', 'Release Pending')
160-
AND 'Fixed in Build' is not EMPTY
160+
AND 'Errata Link' is not EMPTY
161161
AND labels != jotnar_needs_attention
162162
"""
163163

supervisor/testing_analyst.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class InputSchema(BaseModel):
2424
test_location_info: TestLocationInfo = Field(
2525
description="Information about where to find tests and test results"
2626
)
27-
erratum: FullErratum | None = Field(description="Details of the related ERRATUM")
27+
erratum: FullErratum = Field(description="Details of the related ERRATUM")
2828
current_time: datetime = Field(description="Current timestamp")
2929

3030

@@ -75,7 +75,7 @@ def render_prompt(input: InputSchema) -> str:
7575
).render(input)
7676

7777

78-
async def analyze_issue(jira_issue: FullIssue, erratum: FullErratum | None) -> OutputSchema:
78+
async def analyze_issue(jira_issue: FullIssue, erratum: FullErratum) -> OutputSchema:
7979
agent = ToolCallingAgent(
8080
llm=ChatModel.from_name(
8181
os.environ["CHAT_MODEL"],

0 commit comments

Comments
 (0)