fix(llm): enable AI analysis for successful pipeline runs#2810
fix(llm): enable AI analysis for successful pipeline runs#2810BoseKarthikeyan wants to merge 1 commit into
Conversation
|
|
There was a problem hiding this comment.
Code Review
This pull request modifies the shouldTriggerRole function to trigger LLM analysis for any completed PipelineRun when no CEL expression is provided, rather than only for failed ones. However, the current implementation unconditionally returns true when role.OnCEL is empty, which would trigger the analysis on every reconcile of an active or running PipelineRun. The reviewer recommends verifying that the PipelineRun is actually completed (either succeeded or failed) before triggering, and restoring the removed corev1 and apis imports to implement this check.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Thanks @BoseKarthikeyan for opening this PR!
Some thoughts:
- The
fixtitle is misleading. PaC intentionally runs only for failed pipelines. - Since we are changing LLM analysis to run on non-failed pipelineruns by default, we should update the docs to reflect the same. [multiple occurences in docs which mention this]
- We use a single commit for a change convention in the repo so I would request you to squash the changes into a single commit and use rebase instead of a merge to update the branch.
- Request you to sign the CLA.
|
@theakshaypant, Thanks for the review. Addressed all points in this update. ✅ What I changed
🧪 Validationgo test ./pkg/llm -run 'TestShouldTriggerRole|TestShouldTriggerRoleEvaluations' |
0034e32 to
2df3ae7
Compare
|
@BoseKarthikeyan Please address the CLA notice #2810 (comment) |
|
@theakshaypant, I did multiple time and not sure why it is showing Missing CLA Authorization |
You can refer the Help Article and other links in the original comment. |
|
@theakshaypant, It is done and EasyCLA check has been passed.. |
|
/ok-to-test |
|
(nit, no action: in general it is better practice to create a pull request out of named branch instead of your main branch) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2810 +/- ##
=======================================
Coverage 60.11% 60.12%
=======================================
Files 210 210
Lines 21145 21150 +5
=======================================
+ Hits 12711 12716 +5
Misses 7641 7641
Partials 793 793 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
📝 Description of the Change
Fix AI/LLM role triggering so roles without an
on_celexpression run for completed PipelineRuns regardless of success or failure.Previously, the default trigger path only executed analysis for failed runs, which meant success-oriented roles such as a pipeline success summary would be skipped unless they had an explicit CEL expression.
This change:
on_celbehavior for success-only or failure-only roles🔗 Linked GitHub Issue
Fixes #
🧪 Testing Strategy
Details:
go test ./pkg/llmon_celcase🤖 AI Assistance
AI assistance was used to help review the existing LLM trigger flow, propose the minimal code change, and update unit tests. The final code and behavior were manually reviewed and validated with package-level tests.
✅ Submitter Checklist
fix:,feat:) matches the "Type of Change" I selected above.make testandmake lintlocally to check for and fix anyissues. For an efficient workflow, I have considered installing
pre-commit and running
pre-commit installtoautomate these checks.