Fix empty Slack summary in payload-agent-analyze notifications#80941
Conversation
agentic-ci --no-streaming mixes non-JSON header lines (e.g.
"▶ Backend: local") into stdout alongside stream-json output.
jq aborts on the first non-JSON line and never reaches the
{"type":"result"} record, leaving SUMMARY empty and Slack
showing "No summary available."
Pre-filter with grep to pass only JSON lines to jq.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
WalkthroughA single line in the Slack-summary phase of the Claude payload agent script is updated to pre-filter ChangesSlack Summary Extraction Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @not-stbenjam. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test (Automated: Extending self-approval rights and ok-to-test to my bot account.) |
|
/pj-rehearse |
|
@stbenjam: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@stbenjam: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
[REHEARSALNOTIFIER]
Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: not-stbenjam, petr-muller, stbenjam The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
wtf |
|
/pj-rehearse ack |
|
@stbenjam: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@not-stbenjam: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
agentic-ci --no-streamingmixes non-JSON header lines (e.g.▶ Backend: local) into stdout alongside Claude's stream-json outputjqaborts on the first non-JSON line and never reaches the{"type":"result"}record, soSUMMARYis always emptygrep -E '^\{'to pass only JSON lines tojqTest plan
jqfails silently on mixed JSON/non-JSON input (exit code 5, no output)agentic-ci run --no-streamingconfirms old extraction returns empty, fixed extraction returns the summary🤖 Generated with Claude Code
Summary by CodeRabbit
This PR fixes the Slack notification message sent by the
openshift-claude-payload-agentCI step, which is part of OpenShift's release engineering infrastructure for automated payload analysis.Problem: Slack notifications displayed "No summary available." instead of showing Claude's analysis findings because the extraction logic failed to parse the agent's output.
Root Cause: The
agentic-ci --no-streamingcommand outputs mixed content to stdout—both non-JSON header lines (like▶ Backend: local) and JSON stream records. The extraction command piped this directly tojq, which aborts on the first non-JSON line and never processes the{"type":"result"}record containing the summary.Solution: Line 579 now pre-filters the output with
grep -E '^\{'to pass only JSON lines tojq. This ensures the summary extraction succeeds even with mixed input, allowing Slack notifications to display Claude's analysis findings.The fix affects the Slack summary phase of the Claude payload analysis workflow in OpenShift CI, ensuring that release engineers receive Claude's analysis summary in Slack notifications for rejected OCP payloads.