Skip to content

perf-keeper integration to Phase1 for regression analysis reports#21

Open
qu4rkn3t wants to merge 2 commits into
cloud-bulldozer:mainfrom
qu4rkn3t:integrate-perf-keeper
Open

perf-keeper integration to Phase1 for regression analysis reports#21
qu4rkn3t wants to merge 2 commits into
cloud-bulldozer:mainfrom
qu4rkn3t:integrate-perf-keeper

Conversation

@qu4rkn3t

@qu4rkn3t qu4rkn3t commented Jun 22, 2026

Copy link
Copy Markdown

Type of change

  • Refactor
  • New feature
  • Bug fix
  • Optimization
  • Documentation Update

Description

When Phase1 detects an accepted payload, it extracts the Prow job URL from the JIRA description and calls perf-keeper's /analyze endpoint. 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 /analyze endpoint
  • phase1.py: Call perf-keeper and attach report in "accepted" branch
  • jira_client.py: Added add_attachment() method to handle files
  • release_controller.py: Added extract_prow_job_url() method to get Prow job url for perf-keeper
  • framework.py: Added support for perf-keeper
  • base.py: Added support for perf-keeper
  • config.yaml: Added perf-keeper configuration

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Testing

Note: tests written with Claude code assistance

  • All existing tests updated to handle perf-keeper mocking
  • Added comprehensive tests for new functionality
  • 39 tests passing, 100% coverage on new code

What we tested:

  • Client initialization with/without auth
  • Successful analysis and report generation
  • Error handling (timeout, HTTP errors, network failures)
  • JIRA attachment upload
  • Framework initialization with perf-keeper
  • Dry-run mode

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"):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

When analysis_result.get("passed") is True, the result is silently discarded.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

When the job passes, there's no regression to report, so we wouldn't attach anything in JIRA right?

@ArthurChenCoding ArthurChenCoding Jun 23, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, you are right, I got confused. good work👍(I dont have merge access btw)

@ArthurChenCoding

ArthurChenCoding commented Jun 22, 2026

Copy link
Copy Markdown
Member

Everything lgtm, can you take a look? @jtaleric (not sure who has write access)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 into FirstPassFramework + phase initialization.
  • Extended JiraClient with add_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.

Comment thread firstpass/phases/phase1.py
Comment thread config.yaml
Comment thread firstpass/framework.py
self.logger.info(f"Report preview:\n{preview}")
else:
try:
self.jira_client.add_attachment(issue, filename, markdown_report)

@rsevilla87 rsevilla87 Jun 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@rsevilla87 rsevilla87 added the enhancement New feature or request label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants