Add rebuild agent and triage rebuild resolution#398
Add rebuild agent and triage rebuild resolution#398lbarcziova wants to merge 3 commits intopackit:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new rebuild_agent to automate package rebuilds against updated dependencies, supporting both direct and queue-based execution. It integrates this new agent into the existing system by adding new Makefile targets, updating documentation, and modifying the triage agent's logic to include "rebuild" as a possible resolution for CVEs, especially for vendored/bundled dependencies. Additionally, it enhances Jira interaction by introducing a SKIP_JIRA environment variable to bypass Jira write operations and modifies git commit tasks to allow empty commits. Review comments suggest improving error handling consistency in the rebuild_agent, refactoring Makefile targets for better maintainability, removing an unused parameter, and refining Jira comment formatting.
8ec3981 to
f56cb4d
Compare
f56cb4d to
678e081
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new Rebuild agent and workflow designed to handle package rebuilds necessitated by dependency updates. Key changes include updating the triage agent to recognize rebuild scenarios, adding new Redis queues and Jira labels for tracking, and implementing a JIRA_DRY_RUN mode to skip write operations. The feedback highlights several improvement opportunities in the new rebuild agent, specifically regarding the robustness of the task processing loop, the removal of unused function parameters, and the use of more appropriate data models for successful task results.
| ["git", "diff", "--cached", "--quiet"], | ||
| cwd=state.local_clone, | ||
| ) | ||
| is_empty_commit = exit_code == 0 # exit code 0 means no staged changes, so commit would be empty |
There was a problem hiding this comment.
If is_empty_commit is true, the agent will create an empty commit and open a merge request. In the context of RHEL package maintenance, a rebuild usually requires a new NVR (Name-Version-Release), which is achieved by bumping the release number in the spec file. If update_release failed to modify the spec file, an empty commit will not result in a new build. Consider whether creating an MR with an empty commit is the desired behavior when no changes are detected.
There was a problem hiding this comment.
it is, for %autorelease and %autochangelog scenario
Introduce a rebuild agent that handles package rebuilds against updated dependencies without source code changes. The agent uses a deterministic workflow (no LLM except for changelog generation via LogAgent). Extend triage agent to detect rebuild scenarios: vendored/bundled dependency CVEs (Go, Rust, Node.js) and explicit rebuild requests. Triage checks dependency readiness via issuelinks and JQL search before routing to rebuild queue. Assisted-by: Claude
Add per-run flag to force triage of Y-stream CVEs that would normally be skipped by the eligibility check. Works via env var for standalone runs and via Redis metadata for queue/trigger-pipeline mode. Assisted-by: Claude
Add global MCP gateway env var that skips all Jira writes (status changes, comments, labels, fields) while keeping reads working. Useful for testing agent workflows without modifying real Jira issues. Assisted-by: Claude
678e081 to
0111753
Compare
Introduce a rebuild workflow for packages that need rebuilding against updated dependencies without source code changes (e.g., vendored dependency CVEs in Go/Rust/Node.js packages). The triage agent detects
rebuild scenarios by checking dependency issue status via issuelinks or JQL search.
Also adds JIRA_DRY_RUN, FORCE_CVE_TRIAGE, and DEPENDENCY_COMPONENT options for flexible standalone testing.
Assisted-by: Claude
Tests I ran so far:
resulting in https://gitlab.com/redhat/centos-stream/rpms/git-lfs/-/merge_requests/41