Skip to content

Conversation

@panyamkeerthana
Copy link
Collaborator

@panyamkeerthana panyamkeerthana commented Oct 2, 2025

testing analyst couldn't handle NEWA related issues.
Part of: https://github.com/packit/jotnar/issues/193

  • added ErrataComment model and comments field
  • added get_erratum_comments function for given erratum_id
  • added erratum_comments input and also added them to NEWA instructions, extract RHELMISC issue keys from erratum comments
  • pass erratum comments to testing analyst
  • added tool to read JIRA issues

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces functionality to fetch errata comments and provide them to the testing analyst, enabling it to handle NEWA-related issues. The changes are logical and well-structured, including new data models, an API utility function, and updates to the issue handler and testing analyst agent. My feedback focuses on improving robustness and maintainability by suggesting more specific exception handling, using a more idiomatic list comprehension, and removing an unused import.

@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/integrate-errata-jira-newa branch 3 times, most recently from bcb2e70 to bd24aa4 Compare October 2, 2025 19:14
Copy link
Collaborator

@Jazzcort Jazzcort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some thoughts. I think we’ll need a double review from @owtaylor.

@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/integrate-errata-jira-newa branch from ee767f9 to 3687817 Compare October 3, 2025 01:15
@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/integrate-errata-jira-newa branch 5 times, most recently from bf92914 to 1839ca0 Compare October 6, 2025 17:41
@panyamkeerthana
Copy link
Collaborator Author

panyamkeerthana commented Oct 6, 2025

Ran the process-issue workflow in DRY_RUN mode for RHEL-107890.

Dry-run logs
kpanyam@kpanyam-mac ai-workflows % DRY_RUN=true DEBUG=true make process-issue JIRA_ISSUE=RHEL-107890
podman compose -f compose.yaml --profile=supervisor run --rm \
                supervisor python -m supervisor.main --debug --dry-run process-issue RHEL-107890
>>>> Executing external compose provider "/opt/homebrew/bin/docker-compose". Please see podman-compose(1) for how to disable this message. <<<<

[+] Creating 2/2
 ✔ Container ai-workflows-phoenix-1  Running                                                                                                         0.0s 
 ✔ Container ai-workflows-valkey-1   Running                                                                                                         0.0s 
DEBUG:asyncio:Using selector: EpollSelector
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): issues.redhat.com:443
DEBUG:urllib3.connectionpool:https://issues.redhat.com:443 "GET /rest/api/2/field HTTP/1.1" 200 16057
DEBUG:urllib3.connectionpool:https://issues.redhat.com:443 "GET /rest/api/2/issue/RHEL-107890?fields=components,summary,status,fixVersions,customfield_12321541,customfield_12318450,customfield_12320940,customfield_12321540,comment,description HTTP/1.1" 200 3366
INFO:supervisor.issue_handler:Running workflow for issue https://issues.redhat.com/browse/RHEL-107890
DEBUG:supervisor.errata_utils:Getting detailed information for erratum 154623
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): errata.engineering.redhat.com:443
DEBUG:urllib3.connectionpool:https://errata.engineering.redhat.com:443 "GET /api/v1/erratum/154623 HTTP/1.1" 200 1747
DEBUG:supervisor.errata_utils:Getting comments for erratum 154623
DEBUG:urllib3.connectionpool:https://errata.engineering.redhat.com:443 "GET /api/v1/comments?filter%5Berrata_id%5D=154623 HTTP/1.1" 200 1279
18:46:13 - LiteLLM:DEBUG: http_handler.py:587 - Using AiohttpTransport...
DEBUG:LiteLLM:Using AiohttpTransport...
18:46:13 - LiteLLM:DEBUG: http_handler.py:645 - Creating AiohttpTransport...
DEBUG:LiteLLM:Creating AiohttpTransport...
18:46:13 - LiteLLM:DEBUG: http_handler.py:655 - NEW SESSION: Creating new ClientSession (no shared session provided)
DEBUG:LiteLLM:NEW SESSION: Creating new ClientSession (no shared session provided)
18:46:13 - LiteLLM:DEBUG: litellm_logging.py:181 - [Non-Blocking] Unable to import GenericAPILogger - LiteLLM Enterprise Feature - No module named 'litellm_enterprise'
DEBUG:LiteLLM:[Non-Blocking] Unable to import GenericAPILogger - LiteLLM Enterprise Feature - No module named 'litellm_enterprise'
18:46:13 - LiteLLM:DEBUG: http_handler.py:587 - Using AiohttpTransport...
DEBUG:LiteLLM:Using AiohttpTransport...
18:46:13 - LiteLLM:DEBUG: http_handler.py:645 - Creating AiohttpTransport...
DEBUG:LiteLLM:Creating AiohttpTransport...
18:46:13 - LiteLLM:DEBUG: http_handler.py:655 - NEW SESSION: Creating new ClientSession (no shared session provided)
DEBUG:LiteLLM:NEW SESSION: Creating new ClientSession (no shared session provided)
18:46:13 - LiteLLM:DEBUG: http_handler.py:587 - Using AiohttpTransport...
DEBUG:LiteLLM:Using AiohttpTransport...
18:46:13 - LiteLLM:DEBUG: http_handler.py:645 - Creating AiohttpTransport...
DEBUG:LiteLLM:Creating AiohttpTransport...
18:46:13 - LiteLLM:DEBUG: http_handler.py:655 - NEW SESSION: Creating new ClientSession (no shared session provided)
DEBUG:LiteLLM:NEW SESSION: Creating new ClientSession (no shared session provided)
18:46:13 - LiteLLM:DEBUG: http_handler.py:587 - Using AiohttpTransport...
DEBUG:LiteLLM:Using AiohttpTransport...
18:46:13 - LiteLLM:DEBUG: http_handler.py:645 - Creating AiohttpTransport...
DEBUG:LiteLLM:Creating AiohttpTransport...
18:46:13 - LiteLLM:DEBUG: http_handler.py:655 - NEW SESSION: Creating new ClientSession (no shared session provided)
DEBUG:LiteLLM:NEW SESSION: Creating new ClientSession (no shared session provided)
DEBUG:urllib3.connectionpool:https://issues.redhat.com:443 "GET /rest/api/2/issue/RHELMISC-17858?fields=components,summary,status,fixVersions,customfield_12321541,customfield_12318450,customfield_12320940,customfield_12321540,comment,description HTTP/1.1" 200 1398
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): phoenix:6006
DEBUG:urllib3.connectionpool:http://phoenix:6006 "POST /v1/traces HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:http://phoenix:6006 "POST /v1/traces HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:http://phoenix:6006 "POST /v1/traces HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:http://phoenix:6006 "POST /v1/traces HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:http://phoenix:6006 "POST /v1/traces HTTP/1.1" 200 0
INFO:supervisor.testing_analyst:Direct run completed: {
    "state": "tests-passed",
    "comment": "All automated tests passed.\n\nSanity and regression testing was executed, and the results can be found at https://reportportal-rhel.apps.dno.ocp-hub.prod.psi.redhat.com/ui/#baseosqe/launches/all/5f5d406f-cc31-4c6b-9ff0-fce74cb92d98"
}
DEBUG:urllib3.connectionpool:https://issues.redhat.com:443 "GET /rest/api/2/issue/RHEL-107890/transitions?expand=transitions.fields HTTP/1.1" 200 1143
INFO:supervisor.jira_utils:Dry run: would change issue RHEL-107890 status to Release Pending
DEBUG:supervisor.jira_utils:Dry run: would post {'transition': {'id': '101'}, 'update': {'comment': [{'add': {'body': 'All automated tests passed.\n\nSanity and regression testing was executed, and the results can be found at https://reportportal-rhel.apps.dno.ocp-hub.prod.psi.redhat.com/ui/#baseosqe/launches/all/5f5d406f-cc31-4c6b-9ff0-fce74cb92d98'}}]}} to issue/RHEL-107890/transitions
INFO:__main__:Issue RHEL-107890 processed, status=All automated tests passed.

Sanity and regression testing was executed, and the results can be found at https://reportportal-rhel.apps.dno.ocp-hub.prod.psi.redhat.com/ui/#baseosqe/launches/all/5f5d406f-cc31-4c6b-9ff0-fce74cb92d98, reschedule_in=never
DEBUG:asyncio:Using selector: EpollSelector

Copy link
Collaborator

@owtaylor owtaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor comments, otherwise looks great.

- Extended Erratum model to include comments list
- Added FullErratum model with comments support
- Modified testing analyst to receive erratum with comments
- added NEWA instructions to the testing analyst prompt
added a tool to read JIRA issues from URLs in erratum comments
that aren't passed as input
@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/integrate-errata-jira-newa branch from 3fd90be to 3085da7 Compare October 6, 2025 19:54
Copy link
Collaborator

@owtaylor owtaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@owtaylor owtaylor merged commit cf8e975 into packit:main Oct 6, 2025
1 check passed
@panyamkeerthana panyamkeerthana deleted the panyamkeerthana/integrate-errata-jira-newa branch October 7, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants