perf-keeper integration to Phase1 for regression analysis reports#21
perf-keeper integration to Phase1 for regression analysis reports#21qu4rkn3t wants to merge 2 commits into
Conversation
| if prow_job_url: | ||
| self.logger.info(f"{issue.key}: Calling perf-keeper for analysis") | ||
| analysis_result = self.perf_keeper_client.analyze_job(prow_job_url) | ||
| if analysis_result and not analysis_result.get("passed"): |
There was a problem hiding this comment.
When analysis_result.get("passed") is True, the result is silently discarded.
There was a problem hiding this comment.
When the job passes, there's no regression to report, so we wouldn't attach anything in JIRA right?
There was a problem hiding this comment.
Yeah, you are right, I got confused. good work👍(I dont have merge access btw)
|
Everything lgtm, can you take a look? @jtaleric (not sure who has write access) |
There was a problem hiding this comment.
Pull request overview
Integrates the external perf-keeper analysis service into the FirstPass agent so that, when Phase1 observes an accepted payload, it can request an AI-generated regression analysis report and (optionally) attach it back to the originating JIRA issue for downstream use.
Changes:
- Added
PerfKeeperClient(httpx-based) and wired it intoFirstPassFramework+ phase initialization. - Extended
JiraClientwithadd_attachment()and updated Phase1 to request/attach perf-keeper’s markdown analysis. - Updated configuration, dependencies, and tests/fixtures to cover the new client and integration paths.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
firstpass/perf_keeper_client.py |
Adds a dedicated HTTP client for perf-keeper /analyze. |
firstpass/framework.py |
Initializes perf-keeper client from config and passes it into phases; adds cleanup hook. |
firstpass/phases/base.py |
Extends Phase constructor to accept an optional perf-keeper client. |
firstpass/phases/phase1.py |
Calls perf-keeper on accepted payload path and attaches report/comment updates. |
firstpass/release_controller.py |
Adds Prow job URL extraction helper for perf-keeper input. |
firstpass/jira_client.py |
Adds add_attachment() for uploading generated markdown reports. |
main.py |
Ensures framework cleanup is called via try/finally. |
config.yaml |
Adds perf-keeper configuration block. |
requirements.txt |
Adds httpx dependency. |
tests/test_perf_keeper_client.py |
New unit tests for perf-keeper client behavior and error handling. |
tests/test_jira_client.py |
Adds coverage for the new attachment upload helper. |
tests/test_framework.py |
Updates framework tests to account for perf-keeper initialization/injection. |
tests/conftest.py |
Adds perf-keeper config to the shared test config fixture. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| self.logger.info(f"Report preview:\n{preview}") | ||
| else: | ||
| try: | ||
| self.jira_client.add_attachment(issue, filename, markdown_report) |
There was a problem hiding this comment.
Can we add a comment rather than an attachment to the JIRA card?
I think that's the more natural way to interact with an AI driven job analysis agent
Type of change
Description
When Phase1 detects an accepted payload, it extracts the Prow job URL from the JIRA description and calls perf-keeper's
/analyzeendpoint. Perf-keeper performs AI-driven analysis and returns a structured markdown report. Phase1 then uploads this report as a JIRA attachment, providing comprehensive regression analysis data for Phase2 to use.Specifics:
perf_keeper_client.py: HTTP client for perf-keeper/analyzeendpointphase1.py: Call perf-keeper and attach report in "accepted" branchjira_client.py: Addedadd_attachment()method to handle filesrelease_controller.py: Addedextract_prow_job_url()method to get Prow job url for perf-keeperframework.py: Added support for perf-keeperbase.py: Added support for perf-keeperconfig.yaml: Added perf-keeper configurationChecklist before requesting a review
Testing
Note: tests written with Claude code assistance
What we tested: