ci: stream Claude output in GHA workflow logs - #8778
Conversation
Add --output-format stream-json to the Claude invocation so that tool calls and messages are streamed to stdout in real time. Without this, the job produces no visible output until Claude finishes, making it impossible to diagnose timeouts or stuck runs from the GHA logs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
📝 WalkthroughWalkthroughThe reusable GitHub Actions workflow for running Claude on pull requests is updated so the Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (10 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/reusable-claude-on-pr.yaml:
- Line 127: The claude command on line 127 uses --output-format stream-json
which streams raw tool outputs and model content to Actions logs without
automatic secret redaction, potentially exposing GH_TOKEN and CLAUDE_PROMPT
environment variables. Gate the --output-format stream-json feature behind a
conditional debug input flag (only enable when explicitly requested) and add
deterministic masking logic to redact known secrets before log emission. Ensure
sensitive outputs like tokens and prompt content are masked even in stream-json
output mode.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 9fa5ad00-117b-4dbc-a4e8-7c45991fa37b
📒 Files selected for processing (1)
.github/workflows/reusable-claude-on-pr.yaml
|
@bryan-cox: 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. |
|
/area ai |
|
/verified later @bryan-cox |
|
@bryan-cox: This PR has been marked to be verified later by DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/lgtm |
|
Pipeline controller notification No second-stage tests were triggered for this PR. This can happen when:
Use |
What this PR does / why we need it:
Adds
--output-format stream-jsonto the Claude Code invocation in the reusable GHA workflow. Without this flag, Claude produces no stdout output until it finishes — if the job times out or gets stuck, the logs are empty and there's no way to diagnose what happened.With
stream-json, each tool call and message is written to stdout in real time, so the GHA logs show exactly what Claude was doing.Which issue(s) this PR fixes:
N/A
Special notes for your reviewer:
Single-line change in
reusable-claude-on-pr.yaml.Checklist:
Summary by CodeRabbit