feat(STONEINTG-1519): create PR group snapshots from ComponentGroups#1549
Conversation
350832c to
5158762
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1549 +/- ##
==========================================
+ Coverage 65.62% 73.10% +7.47%
==========================================
Files 63 63
Lines 8481 8725 +244
==========================================
+ Hits 5566 6378 +812
+ Misses 2271 1693 -578
- Partials 644 654 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for the ComponentGroup model within the snapshot and integration test reporting workflows, facilitating a transition away from the application-centric model. The changes involve significant updates to the build pipeline and snapshot adapters, as well as the underlying object loader. Feedback focuses on critical logic errors in the buildpipeline_adapter.go where scenario counts are overwritten rather than accumulated in loops, and where snapshot annotation logic was incorrectly moved outside of iteration blocks, leading to incomplete reporting. A correction for an error message in the snapshot adapter was also noted to ensure consistency with the new model.
12d1c4d to
eac2d0f
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request extends the PR group snapshot functionality to support the ComponentGroup model alongside the existing Application model. Key changes include refactoring the build pipeline and snapshot adapters to handle both owner types, updating the object loader to use generic owner labels, and exporting snapshot creation helpers. Review feedback identifies a critical isolation issue in the loader where the removal of owner-specific filtering could lead to incorrect snapshot creation. Additionally, performance optimizations are recommended to avoid redundant API calls and inefficient looping when fetching integration test scenarios and processing component lists.
There was a problem hiding this comment.
Code Review
This pull request refactors the integration service to support the ComponentGroup model alongside the existing Application model for snapshot creation and status reporting. Key changes include updating snapshot creation logic, enhancing the object loader to handle both models, and refactoring controllers to use these new capabilities. A suggestion was made to pass slices directly instead of pointers to slices in the fetchSnapshotComponentFromGCL function, as slices are already reference types in Go.
|
/retest |
|
/retest |
Code reviewFound 1 issue:
🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
|
🤖 Finished Review · ✅ Success · Started 11:20 AM UTC · Completed 11:34 AM UTC |
|
🤖 Finished Review · ✅ Success · Started 11:49 AM UTC · Completed 12:05 PM UTC |
|
🤖 Review · Started 4:15 PM UTC |
|
🤖 Finished Review · ✅ Success · Started 4:15 PM UTC · Completed 4:31 PM UTC |
|
/retest |
* If an incoming build pipeline's component is part of a component group and if the build PLR belongs to a PR group create the group Snapshot based on the componentGroup(s) that the component belongs to * Maintain feature parity with the current (application-based) PR group implementation Signed-off-by: dirgim <kpavic@redhat.com> rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED
* Add unit tests to cover the snapshot adapter's expansion to cover PR groups for componentGroups * Add unit tests to cover the buildpipeline adapter's expansion to cover PR groups for componentGroups * Add unit tests to cover the statusreport adapter's expansion to cover PR groups for componentGroups Signed-off-by: dirgim <kpavic@redhat.com> rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED
* Reduce code complexity for initial integration test status reporting in buildpipeline adapter's EnsureIntegrationTestReportedToGitProvider by extracting the logic into reportIntegrationStatusAndHandleGroups functions for, split by application and componentGroup mode * Update unit tests to test for multiple component groups Signed-off-by: dirgim <kpavic@redhat.com> rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED
|
🤖 Finished Review · ✅ Success · Started 9:35 AM UTC · Completed 9:48 AM UTC |
* add a separate loader function for fetching build pipelineRuns for applications * add filterPipelineRunsForComponentGroups that ensures that build pipelineRuns for a PR group also match any of the componentGroups for that component * Optimize fetching snapshot components in snapshot adapter when looping over componentGroups * Add unit tests for the new filtering function and its helper Signed-off-by: dirgim <kpavic@redhat.com> Assisted-By: Cursor rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED
|
🤖 Finished Review · ✅ Success · Started 9:56 AM UTC · Completed 10:09 AM UTC |
|
/retest |
|
🤖 Finished Retro · ✅ Success · Started 3:29 PM UTC · Completed 3:35 PM UTC |
Retro: PR #1549 — feat(STONEINTG-1519): create PR group snapshots from ComponentGroupsTimeline: Human-authored XXL feature PR opened April 28 by Review bot behavior: The bot reviewed 5 distinct commits (the PR was force-pushed between each round). It raised 11 unique findings across all rounds — 3 medium-severity logic errors and 8 low-severity items (naming conventions, missing godoc comments, edge cases). The medium-severity findings were genuine and were addressed by the author between rounds. Two low-severity findings persisted across rounds (a Assessment: The bot's individual findings were reasonable — the medium-severity logic errors in particular were valid catches that the 4 human reviewers missed. However, the use of No new proposals filed. All candidate improvements are already tracked by existing open issues in
This PR is a good test case for validating fixes to the above issues — a human-authored PR with 4 human approvals where the review bot's value came from catching medium-severity logic errors, but the |
Maintainers will complete the following section