Make report-id optional for cluster reports get#926
Conversation
The `cluster reports get` subcommand previously required the `--report-id` flag. It is now optional: when omitted, the latest report for the cluster is fetched and returned. When `--report-id` is not provided, a message is written to standard error indicating that the latest report will be searched for and returned. If the cluster has no reports, a corresponding message is written to standard error and the command exits without error. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011kSv6MRg3ccFMw8rpy12YE
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: geowa4 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
Walkthrough
ChangesCluster report get fallback
Sequence Diagram(s)sequenceDiagram
participant "run()" as run
participant latestReportID as latestReportID
participant backplaneClient as backplaneClient
participant "os.Stderr" as stderr
run->>latestReportID: resolve reportID when o.reportID is empty
latestReportID->>backplaneClient: ListReports(ctx)
backplaneClient-->>latestReportID: reports
latestReportID-->>run: latest reportId or ""
run->>stderr: write status messages
run->>backplaneClient: GetReport(clusterID, reportID)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@geowa4: 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. |
The
cluster reports getsubcommand previously required the--report-idflag. It is now optional: when omitted, the latest report for the cluster is fetched and returned.When
--report-idis not provided, a message is written to standard error indicating that the latest report will be searched for and returned. If the cluster has no reports, a corresponding message is written to standard error and the command exits without error.Claude-Session: https://claude.ai/code/session_011kSv6MRg3ccFMw8rpy12YE
Summary by CodeRabbit
New Features
--report-idis not provided.Bug Fixes