Skip to content

Conversation

@sandeepknd
Copy link

@sandeepknd sandeepknd commented Nov 11, 2025

Summary

Added comprehensive etcd health monitoring and performance analysis commands for OpenShift clusters. This new plugin provides essential diagnostic capabilities for troubleshooting
etcd-related cluster issues and proactive performance monitoring.

Changes

New Plugin: etcd

Added a complete etcd monitoring plugin with two key commands:

1. /etcd:health-check - Comprehensive health diagnostics

  • Validates etcd pod status and availability across all cluster nodes
  • Verifies cluster health and member synchronization
  • Confirms leader election and quorum status
  • Analyzes database size and fragmentation levels
  • Monitors disk space utilization on etcd nodes
  • Scans recent logs for errors and warnings
  • Optional verbose mode for detailed performance metrics

2. /etcd:analyze-performance - Performance analysis and bottleneck detection

  • Analyzes disk I/O performance (commit latency, WAL fsync duration)
  • Measures network latency between etcd peer members
  • Evaluates request/response performance by operation type
  • Tracks leader stability and proposal metrics
  • Identifies slow operations from etcd logs
  • Provides performance recommendations based on upstream etcd benchmarks
  • Configurable time window for log analysis (default: 5 minutes)

Key Features

  • Automated diagnostics: Detects common issues like split-brain, disk saturation, and network problems
  • Actionable recommendations: Provides specific remediation steps for identified issues
  • Performance benchmarking: Compares metrics against recommended thresholds
  • Comprehensive documentation: Includes detailed command documentation with examples and troubleshooting guides
  • OpenShift-native: Uses oc CLI and integrates seamlessly with OpenShift environments

Files Added

  • plugins/etcd/.claude-plugin/plugin.json - Plugin metadata
  • plugins/etcd/README.md - User-facing documentation with use cases and examples
  • plugins/etcd/commands/health-check.md - Health check command specification
  • plugins/etcd/commands/analyze-performance.md - Performance analysis command specification
  • .claude-plugin/marketplace.json - Marketplace registration
  • PLUGINS.md - Plugin listing update
  • docs/data.json - Documentation index update

Test Plan

  • Verify plugin loads successfully in Claude Code
  • Test /etcd:health-check on healthy cluster - returns comprehensive status report
  • Test /etcd:analyze-performance - collects and analyzes metrics successfully
  • Validate all prerequisite checks function correctly
  • Confirm error handling for missing etcd pods or cluster connectivity issues
  • Verify output formatting is clear and actionable

Use Cases

  1. Incident response: Quick diagnostics when cluster experiences control plane issues
  2. Performance tuning: Identify disk I/O or network bottlenecks before they impact production
  3. Capacity planning: Monitor database growth and resource utilization trends
  4. Health monitoring: Regular checks to ensure etcd cluster stability

Generated with https://claude.com/claude-code

Test Results

● Etcd Health Check Summary

===============================================
Etcd Health Check Report

Check Time: 2025-11-19
Cluster: api.cam-src-69220.qe.devcluster.openshift.com:6443
User: system:admin

ETCD POD STATUS

Total Pods: 3/3 Running
All pods ready with 0 restarts

Pod Details:
- etcd-ip-10-0-1-63.us-east-2.compute.internal (Node: ip-10-0-1-63.us-east-2.compute.internal)
- etcd-ip-10-0-61-180.us-east-2.compute.internal (Node: ip-10-0-61-180.us-east-2.compute.internal)
- etcd-ip-10-0-86-112.us-east-2.compute.internal (Node: ip-10-0-86-112.us-east-2.compute.internal)

CLUSTER HEALTH

All endpoints healthy:
https://10.0.1.63:2379 (6.7ms)
https://10.0.61.180:2379 (12.2ms)
https://10.0.86.112:2379 (13.2ms)

CLUSTER MEMBERSHIP

Total Members: 3
Quorum: Healthy (3/3 members started)
All members in "started" state
No unstarted or learner members

LEADERSHIP

Leader: https://10.0.1.63:2379 (ip-10-0-1-63.us-east-2.compute.internal)
Raft Term: 6
Raft Index: 103431
All members synchronized (same raft index)

DATABASE STATUS

Etcd Version: 3.5.24
Database Sizes:
- 10.0.1.63: 86 MB (79 MB in use, 7% fragmentation)
- 10.0.61.180: 86 MB (79 MB in use, 7% fragmentation)
- 10.0.86.112: 86 MB (79 MB in use, 7% fragmentation)

Status: Database size well within 8GB limit
Fragmentation: Normal (7% is healthy)

DISK SPACE

Node: ip-10-0-1-63.us-east-2.compute.internal
/var/lib/etcd: 120G total, 21G used (17%)

Node: ip-10-0-61-180.us-east-2.compute.internal
/var/lib/etcd: 120G total, 22G used (19%)

Node: ip-10-0-86-112.us-east-2.compute.internal
/var/lib/etcd: 120G total, 22G used (19%)

Status: All nodes well below 80% threshold

RECENT ERRORS

No errors, warnings, or fatal messages in recent logs (last 100 lines)

===============================================
OVERALL STATUS: HEALTHY ✓

Summary:
✓ All 3 etcd pods running with no restarts
✓ Cluster health excellent (all endpoints healthy)
✓ Quorum maintained (3/3 members)
✓ Leader elected and stable
✓ Low latency response times (<15ms)
✓ Database size optimal (86MB << 8GB limit)
✓ Low fragmentation (7%)
✓ Ample disk space (17-19% usage)
✓ No recent errors in logs
✓ All members synchronized

Recommendations:
- No immediate action required
- Continue monitoring cluster health
- Current configuration is optimal

The etcd cluster is in excellent health with all checks passing. All three members are healthy, synchronized, and operating normally with good performance metrics.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added Etcd plugin for cluster health monitoring and performance analysis
    • Added commands: /etcd:health-check (optional --verbose) and /etcd:analyze-performance (optional --duration)
  • Documentation

    • Added comprehensive Etcd README and detailed command guides with examples, flags, troubleshooting, and security notes
    • Expanded and standardized public plugin catalog entries across many plugins; marketplace listing updated to include Etcd
  • Chores

    • Deterministic JSON output formatting and minor CI workflow cleanup

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Walkthrough

Adds a new Etcd plugin (manifest, marketplace entry, README, and two command docs: /etcd:health-check and /etcd:analyze-performance), expands and normalizes plugin metadata in docs/data.json, and makes small non-functional tweaks to CI workflow and website JSON output formatting.

Changes

Cohort / File(s) Summary
Top-level plugin index & plugin metadata
PLUGINS.md, docs/data.json
Inserted Etcd plugin in PLUGINS.md and normalized/expanded public metadata across docs/data.json, adding explicit plugin fields (name, description, version, has_readme) and standardized per-command metadata including a new etcd plugin entry with two commands.
Marketplace registry
.claude-plugin/marketplace.json
Added a new etcd entry with name, source (./plugins/etcd), and description.
Plugin descriptor
plugins/etcd/.claude-plugin/plugin.json
Added declarative plugin metadata JSON (name, description, version, author).
Plugin README
plugins/etcd/README.md
Added comprehensive README covering overview, commands, usage, prerequisites, installation, examples, security, and contribution notes.
Command documentation
plugins/etcd/commands/analyze-performance.md, plugins/etcd/commands/health-check.md
Added detailed docs for /etcd:analyze-performance [--duration <minutes>] and /etcd:health-check [--verbose] including synopses, checks, examples, sample outputs, and remediation guidance.
CI workflow (non-functional)
.github/workflows/lint-plugins.yml
Removed an extraneous empty/whitespace-only line; no behavioral change.
Website build script
scripts/build-website.py
Made JSON output deterministic by enabling sort_keys=True in json.dump.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User
  participant CLI as Plugin CLI
  participant Plugin as Etcd Plugin
  participant Etcd as Etcd Cluster

  rect rgba(220,235,255,0.6)
    Note over Plugin,Etcd: Health check flow
  end
  User->>CLI: /etcd:health-check [--verbose]
  CLI->>Plugin: dispatch health-check
  Plugin->>Etcd: run etcdctl health/member list/status
  Etcd-->>Plugin: health & member data
  Plugin-->>CLI: formatted health report
  CLI-->>User: display report

  rect rgba(230,245,230,0.6)
    Note over Plugin,Etcd: Performance analysis flow
  end
  User->>CLI: /etcd:analyze-performance [--duration N]
  CLI->>Plugin: dispatch analyze-performance
  Plugin->>Etcd: collect metrics, logs, leader info (over duration)
  Etcd-->>Plugin: metrics & logs
  Plugin-->>CLI: analysis + remediation suggestions
  CLI-->>User: display performance summary
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review docs/data.json for schema consistency, duplicates, and correct command signatures.
  • Verify PLUGINS.md, README, and command docs align on command names/arguments.
  • Confirm .claude-plugin/marketplace.json source path and plugins/etcd/.claude-plugin/plugin.json version/author fields.
  • Skim plugins/etcd docs for operational/sensitive instructions and correctness of examples.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title claims the etcd plugin was added to the openshift plugin, but the changeset actually adds a separate, dedicated etcd plugin with its own directory, metadata, and documentation. Update the title to accurately reflect that a new standalone etcd plugin was added, for example: 'Add etcd plugin for cluster health and performance analysis' or 'Add dedicated etcd plugin with health-check and analyze-performance commands'.
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
No Real People Names In Style References ✅ Passed No references to real people's names found in style references, commands, skill documentation, or example prompts across all etcd plugin files.
No Assumed Git Remote Names ✅ Passed PR adds etcd plugin documentation and configuration files without any git operations or hardcoded git remote names.
Git Push Safety Rules ✅ Passed PR adds etcd plugin with documentation and metadata. No git push commands, force operations, or automated push workflows detected in changes.
No Untrusted Mcp Servers ✅ Passed PR introduces etcd plugin with documentation and CLI integration only; no untrusted MCP server installations detected.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 11, 2025
@openshift-ci
Copy link

openshift-ci bot commented Nov 11, 2025

Hi @sandeepknd. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 kubernetes-sigs/prow repository.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (3)
plugins/openshift/commands/etcd-check-health.md (1)

33-33: Wrap bare URLs in markdown link syntax.

Lines 33, 450, and 451 contain bare URLs that should be wrapped in markdown link syntax for proper formatting.

Example fix for line 33:

-   - Install from: https://mirror.openshift.com/pub/openshift-v4/clients/ocp/
+   - Install from: [https://mirror.openshift.com/pub/openshift-v4/clients/ocp/](https://mirror.openshift.com/pub/openshift-v4/clients/ocp/)

Also applies to: 450-450, 451-451

plugins/openshift/commands/etcd-analyze-performance.md (2)

36-36: Wrap bare URLs in markdown link syntax.

Lines 36, 512, and 513 contain bare URLs that should be wrapped in markdown link syntax for proper formatting and accessibility.

Also applies to: 512-512, 513-513


363-376: Initialize ISSUES and WARNINGS variables earlier in the script.

The ISSUES and WARNINGS variables are initialized on lines 363–364, but they're only set if the performance report section is reached. For robustness, initialize these at the start of the script (line 82, after prerequisite checks) so they're always defined:

 echo "Analyzing etcd performance (last $DURATION minutes)..."
+ISSUES=0
+WARNINGS=0
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 48e260d and fdc25c2.

📒 Files selected for processing (4)
  • PLUGINS.md (1 hunks)
  • docs/data.json (1 hunks)
  • plugins/openshift/commands/etcd-analyze-performance.md (1 hunks)
  • plugins/openshift/commands/etcd-check-health.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
plugins/openshift/commands/etcd-check-health.md

10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


33-33: Bare URL used

(MD034, no-bare-urls)


330-330: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


335-335: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


377-377: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


450-450: Bare URL used

(MD034, no-bare-urls)


451-451: Bare URL used

(MD034, no-bare-urls)

plugins/openshift/commands/etcd-analyze-performance.md

21-21: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

🔇 Additional comments (2)
docs/data.json (1)

497-508: Registry entries for new etcd commands are properly formatted.

The two new command entries follow the existing JSON structure and naming conventions. No issues detected.

PLUGINS.md (1)

148-149: New OpenShift plugin commands are properly registered.

Both etcd-analyze-performance and etcd-check-health are correctly positioned in the OpenShift plugin section with descriptions and proper formatting that matches existing entries.

@stbenjam
Copy link
Member

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 12, 2025
@stbenjam
Copy link
Member

Should there be an "etcd"-specific plugin?

@sandeepknd
Copy link
Author

Should there be an "etcd"-specific plugin?

This is related to health check with respect to etcd (which is under Openshift only)

@sandeepknd
Copy link
Author

sandeepknd commented Nov 17, 2025

Hi @stbenjam ,
Could you please confirm if I need to create a specific/separate plugin "etcd" outside of openshift ?

@openshift-ci
Copy link

openshift-ci bot commented Nov 18, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sandeepknd
Once this PR has been reviewed and has the lgtm label, please assign zaneb for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sandeepknd
Copy link
Author

@stbenjam ,
I have made the changes. Could you PTAL.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (3)
plugins/etcd/commands/health-check.md (2)

10-10: Fix Markdown linting issues: language specifiers and bare URLs.

Code blocks lack language specifiers and URLs are bare:

  • Lines 10, 330, 335, 377: Code blocks should use ```bash instead of ```
  • Lines 33, 450-451: Bare URLs should be wrapped in Markdown link syntax

Example fixes:

-```
+```bash

-https://mirror.openshift.com/pub/openshift-v4/clients/ocp/
+[OpenShift CLI](https://mirror.openshift.com/pub/openshift-v4/clients/ocp/)

Also applies to: 33-33, 330-330, 335-335, 377-377, 450-451


56-312: Fix critical issues: uninitialized variables and incorrect exit code logic.

The implementation script has multiple correctness issues that will cause failures:

Issue 1 (Line 305): Uninitialized $WARNINGS variable

Line 305 references $WARNINGS but it is never initialized or incremented. The script checks for warnings at lines 155, 161, 236 but only prints messages without updating a counter.

Issue 2 (Line 265): Uninitialized $VERBOSE variable

Line 265 checks if [ "$VERBOSE" = "true" ] but there is no code to parse the --verbose flag from command arguments.

Issue 3 (Lines 307, 310): Exit codes always zero

Both warning and error paths exit with code 0, preventing proper status reporting. Critical issues should exit with non-zero code.

Proposed fix:

+# Initialize variables
+WARNINGS=0
+VERBOSE=false
+
+# Parse arguments
+for arg in "$@"; do
+    if [ "$arg" = "--verbose" ]; then
+        VERBOSE=true
+    fi
+done

 # Later, increment counter when warnings detected:
-if [ "$UNSTARTED" -gt 0 ]; then
-    echo "WARNING: $UNSTARTED member(s) in unstarted state"
-fi

+if [ "$UNSTARTED" -gt 0 ]; then
+    echo "WARNING: $UNSTARTED member(s) in unstarted state"
+    WARNINGS=$((WARNINGS + 1))
+fi

 # And fix exit codes:
-if [ "$WARNINGS" -gt 0 ]; then
-    echo "Status: WARNING - Found $WARNINGS warnings requiring attention"
-    exit 0
-else
-    echo "Status: HEALTHY - All checks passed"
-    exit 0
-fi

+if [ "$WARNINGS" -gt 0 ]; then
+    echo "Status: WARNING - Found $WARNINGS warnings requiring attention"
+    exit 2
+else
+    echo "Status: HEALTHY - All checks passed"
+    exit 0
+fi
plugins/etcd/commands/analyze-performance.md (1)

10-10: Fix Markdown linting issues: language specifiers and bare URLs.

Code blocks lack language specifiers and URLs are bare throughout the file:

  • Lines 10, 375, 380, 477: Code blocks should use ```bash instead of ```
  • Lines 36, 579-580: Bare URLs should be wrapped in Markdown links

Example fixes:

-```
+```bash

-https://mirror.openshift.com/pub/openshift-v4/clients/ocp/
+[OpenShift CLI](https://mirror.openshift.com/pub/openshift-v4/clients/ocp/)

Also applies to: 36-36, 375-375, 380-380, 477-477, 579-580

🧹 Nitpick comments (1)
plugins/etcd/README.md (1)

23-23: Fix Markdown linting issues: language specifiers and bare URLs.

Several code blocks lack language specifiers and bare URLs are used without Markdown link wrapping:

  • Code blocks at lines 23, 28, 44, 49 should use ```bash instead of ```
  • Bare URLs at lines 58, 157-159, 164 should be wrapped in Markdown link syntax: [text](url)

Example fix for line 23:

-```
+```bash

Example fix for line 58:

-Install from https://mirror.openshift.com/pub/openshift-v4/clients/ocp/
+Install from [OpenShift CLI](https://mirror.openshift.com/pub/openshift-v4/clients/ocp/)

Also applies to: 28-28, 44-44, 49-49, 58-58, 157-159, 164-164

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between fdc25c2 and 1856045.

📒 Files selected for processing (7)
  • .claude-plugin/marketplace.json (1 hunks)
  • PLUGINS.md (2 hunks)
  • docs/data.json (1 hunks)
  • plugins/etcd/.claude-plugin/plugin.json (1 hunks)
  • plugins/etcd/README.md (1 hunks)
  • plugins/etcd/commands/analyze-performance.md (1 hunks)
  • plugins/etcd/commands/health-check.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • plugins/etcd/.claude-plugin/plugin.json
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
plugins/etcd/commands/analyze-performance.md

10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


36-36: Bare URL used

(MD034, no-bare-urls)


375-375: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


380-380: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


477-477: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


579-579: Bare URL used

(MD034, no-bare-urls)


580-580: Bare URL used

(MD034, no-bare-urls)

plugins/etcd/README.md

23-23: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


28-28: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


44-44: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


49-49: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


58-58: Bare URL used

(MD034, no-bare-urls)


157-157: Bare URL used

(MD034, no-bare-urls)


158-158: Bare URL used

(MD034, no-bare-urls)


159-159: Bare URL used

(MD034, no-bare-urls)


164-164: Bare URL used

(MD034, no-bare-urls)

plugins/etcd/commands/health-check.md

10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


33-33: Bare URL used

(MD034, no-bare-urls)


330-330: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


335-335: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


377-377: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


450-450: Bare URL used

(MD034, no-bare-urls)


451-451: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (5)
PLUGINS.md (1)

9-9: Etcd plugin properly integrated into documentation index.

The plugin entry is correctly ordered alphabetically in the table of contents, and the plugin section follows the established format with clear command documentation. Links to the detailed README are in place.

Also applies to: 65-73

.claude-plugin/marketplace.json (1)

67-71: Etcd plugin correctly registered in marketplace.

The plugin entry is properly positioned between openshift and yaml entries with correct JSON structure, appropriate source path, and description that matches the registry entries.

plugins/etcd/README.md (1)

1-167: Comprehensive plugin documentation with excellent structure and guidance.

The README provides clear prerequisites, installation steps, use cases, and troubleshooting guidance. The common issues section is particularly useful with actionable remediation steps. Security considerations and performance benchmarks are appropriately included.

docs/data.json (1)

525-545: Etcd plugin entries correctly registered in data catalog.

The two command entries (analyze-performance and health-check) are properly structured with correct synopsis, argument hints, and metadata. The format follows the established pattern used by the openshift plugin for complex argument specifications. The version, skills array, and has_readme flag are all appropriate.

plugins/etcd/commands/analyze-performance.md (1)

293-293: Portability concern is valid but less critical than severity indicates; code already includes fallback handling.

The code at lines 293, 298, and 331 does use bc for arithmetic. However, the analysis shows:

  1. Fallback already present: Line 293 already includes 2>/dev/null || echo 0, which gracefully handles missing bc.

  2. Alpine includes bc by default: Alpine's official Docker image includes a bc applet via BusyBox by default. Since etcd typically runs on Alpine-based containers, bc availability is less of a concern than the review suggests.

  3. Awk alternatives are valid: The suggested awk replacements work correctly in testing, but are optional improvements rather than mandatory fixes given the existing error handling.

Recommendation: The code is currently resilient to missing bc. If maximum portability is desired, consider replacing the bc calls with awk as suggested, or document the bc dependency. However, verify your specific container environment first—if you're using standard Alpine-based etcd images, no changes are required.

Comment on lines +75 to +79
# Parse duration argument (default: 5 minutes)
DURATION=5
if [[ "$1" == "--duration" ]] && [[ -n "$2" ]]; then
DURATION=$2
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix argument parsing to properly handle --duration flag.

The current implementation expects positional arguments ($1 and $2) but the command signature in documentation specifies the --duration <minutes> flag syntax. The parsing logic should handle both forms or consistently use one approach.

Current code at lines 75-79:

DURATION=5
if [[ "$1" == "--duration" ]] && [[ -n "$2" ]]; then
    DURATION=$2
fi

This assumes --duration and the value are separate positional args (e.g., --duration 15), which works but is fragile. Consider using a more robust argument parser or documenting the exact syntax users must follow.

🤖 Prompt for AI Agents
In plugins/etcd/commands/analyze-performance.md around lines 75 to 79, the
duration flag parsing assumes positional args ($1/$2) and fails for combined
forms or different arg orders; update parsing to robustly handle both
“--duration <minutes>” and “--duration=<minutes>” (or document that only one
form is supported). Implement a simple loop over "$@" to detect --duration and
--duration=<value>, validate the value is numeric, and set DURATION accordingly
(falling back to default 5 if absent); ensure other flags are ignored and that
parsing supports args in any order.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
plugins/etcd/commands/analyze-performance.md (1)

10-10: Add language specifier to code blocks for syntax highlighting.

Markdown code blocks throughout the file lack language specifiers. Update all bash/shell code blocks to use ```bash instead of plain backticks. Affected lines include: 10, 64, 102, 148, 161, 230, 263, 284, 384, 389, 425, and 430.

Also applies to: 64-64, 102-102, 148-148, 161-161, 230-230, 263-263, 284-284, 384-384, 389-389, 425-425, 430-430

🧹 Nitpick comments (3)
plugins/etcd/commands/health-check.md (1)

10-10: Add language specifier to code blocks for syntax highlighting.

Multiple code blocks throughout the file use plain backticks instead of ```bash. This affects lines 10, 64, 80, 110, 123, 139, 169, 194, 224, 246, 264, 290, 330, 335, 384, and 389 (and similar locations). Update all bash/shell code blocks to use the bash language specifier for proper syntax highlighting.

Also applies to: 64-64, 80-80, 110-110, 123-123, 139-139, 169-169, 194-194, 224-224, 246-246, 264-264, 290-290, 330-330, 335-335, 384-384, 389-389

plugins/etcd/commands/analyze-performance.md (2)

75-79: Improve argument parsing to handle multiple --duration formats.

The current implementation assumes --duration and its value are consecutive positional arguments ($1 and $2), which is fragile. It doesn't handle:

  • Combined form: --duration=15
  • Value validation (no check that $2 is numeric)
  • Flags in different positions

Consider a more robust approach using a loop over $@:

DURATION=5
while [[ $# -gt 0 ]]; do
    case $1 in
        --duration)
            if [[ -n "$2" ]] && [[ "$2" =~ ^[0-9]+$ ]]; then
                DURATION="$2"
                shift 2
            else
                echo "Error: --duration requires a numeric value"
                exit 1
            fi
            ;;
        --duration=*)
            DURATION="${1#*=}"
            if ! [[ "$DURATION" =~ ^[0-9]+$ ]]; then
                echo "Error: --duration requires a numeric value"
                exit 1
            fi
            shift
            ;;
        *)
            shift
            ;;
    esac
done

358-367: Clarify exit code behavior for WARNING status.

Both "HEALTHY" and "WARNING" states return exit code 0. This may be intentional (warnings are non-fatal), but clarify in documentation whether callers should treat exit 0 as "all clear" when warnings are present. If warnings should trigger failure for scripting purposes, consider returning exit 2 for the WARNING branch:

 else
     echo "Status: ⚠ WARNING - Found $WARNINGS performance warnings"
-    exit 0
+    exit 2
 fi

Document the exit code semantics clearly so users understand that exit 0 includes both healthy and warning states.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 1856045 and 9da6fe7.

📒 Files selected for processing (7)
  • .claude-plugin/marketplace.json (1 hunks)
  • PLUGINS.md (2 hunks)
  • docs/data.json (1 hunks)
  • plugins/etcd/.claude-plugin/plugin.json (1 hunks)
  • plugins/etcd/README.md (1 hunks)
  • plugins/etcd/commands/analyze-performance.md (1 hunks)
  • plugins/etcd/commands/health-check.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • plugins/etcd/.claude-plugin/plugin.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • PLUGINS.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
plugins/etcd/commands/health-check.md

10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


36-36: Bare URL used

(MD034, no-bare-urls)


384-384: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


389-389: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (3)
.claude-plugin/marketplace.json (1)

67-71: Well-structured plugin registry entry.

The marketplace entry is properly formatted and follows the established plugin structure. The entry is well-positioned and the description accurately reflects the plugin's functionality.

plugins/etcd/README.md (1)

1-170: Clear, comprehensive plugin documentation.

The README provides excellent coverage of prerequisites, use cases, common issues with solutions, and security considerations. The performance benchmarks and resource links are particularly valuable for users troubleshooting etcd problems.

docs/data.json (1)

525-545: No duplicates found—etcd entry is properly registered.

Verification confirms exactly one etcd plugin entry exists in docs/data.json with correct structure and complete metadata. The AI summary's claim of duplicate entries was incorrect.

echo "Total members: $MEMBER_COUNT"

if [ "$MEMBER_COUNT" -lt 3 ]; then
echo "WARNING: Etcd cluster has less than 3 members (quorum at risk)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix uninitialized WARNINGS variable and inconsistent exit codes.

The script references an undefined $WARNINGS variable in the summary section (line 305) that is never initialized or incremented throughout the script. Additionally, both the "WARNING" branch (line 307) and "HEALTHY" branch (line 310) return exit code 0, so the exit status doesn't distinguish between warnings and a truly healthy state.

Initialize WARNINGS=0 at the script start and increment it at each warning condition (lines 155, 161, 236, and others). Then update the exit logic to return a non-zero code when warnings are present:

+WARNINGS=0
+
 # Check for unstarted members
 UNSTARTED=$(echo "$MEMBER_LIST" | grep "unstarted" | wc -l)
 if [ "$UNSTARTED" -gt 0 ]; then
     echo "WARNING: $UNSTARTED member(s) in unstarted state"
+    WARNINGS=$((WARNINGS + 1))
 fi

And update the summary logic to properly exit with a non-zero code for warnings:

 if [ "$WARNINGS" -gt 0 ]; then
     echo "Status: WARNING - Found $WARNINGS warnings requiring attention"
-    exit 0
+    exit 2
 else
     echo "Status: HEALTHY - All checks passed"
     exit 0
 fi

Also applies to: 161-161, 236-236, 305-311

🤖 Prompt for AI Agents
In plugins/etcd/commands/health-check.md around lines 155, 161, 236 and the
summary block at 305-311, the script uses an uninitialized $WARNINGS variable
and returns exit code 0 for both warning and healthy branches; initialize
WARNINGS=0 near the script start, increment WARNINGS at each warning condition
(including the echo at line 155, similar places at 161 and 236), and modify the
summary/exit logic so that if WARNINGS>0 the script prints the warning summary
and exits non‑zero (e.g., exit 1), otherwise print healthy and exit 0, ensuring
the printed summary includes the warnings count.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
plugins/etcd/commands/analyze-performance.md (1)

75-79: Fix argument parsing to robustly handle the --duration flag.

The current implementation only handles the positional form (--duration 15) and doesn't account for combined syntax (--duration=15), other flags, or validation that the duration is numeric. This makes the parser fragile and error-prone.

Implement a loop-based argument parser that:

  • Handles both --duration <minutes> and --duration=<minutes> forms
  • Validates the duration value is a positive integer
  • Ignores other flags gracefully
  • Preserves the default value if absent
+ # Parse duration argument (default: 5 minutes)
+ DURATION=5
+ while [[ $# -gt 0 ]]; do
+   case "$1" in
+     --duration)
+       if [[ -n "$2" && "$2" =~ ^[0-9]+$ ]]; then
+         DURATION="$2"
+         shift 2
+       else
+         echo "Error: --duration requires a positive integer argument"
+         exit 1
+       fi
+       ;;
+     --duration=*)
+       DURATION="${1#--duration=}"
+       if ! [[ "$DURATION" =~ ^[0-9]+$ ]]; then
+         echo "Error: --duration requires a positive integer argument"
+         exit 1
+       fi
+       shift
+       ;;
+     *)
+       shift
+       ;;
+   esac
+ done

This replaces lines 75–79 with a more robust parser that validates input and handles both flag formats.

🧹 Nitpick comments (4)
plugins/etcd/README.md (1)

23-25: Add language specifiers to code blocks and wrap bare URLs.

Markdown linting flagged multiple code blocks missing language specifiers and bare URLs that should be wrapped in angle brackets or converted to markdown links.

For code blocks, change ``` to ```bash or other appropriate language (lines 23–25, 28–31, 44–46, 49–51, 67–73, 77–82). For bare URLs (lines 58, 157–159, 164), wrap in angle brackets or convert to markdown links for proper rendering.

Also applies to: 28-31, 44-46, 49-51, 67-73, 77-82, 157-165

plugins/etcd/commands/analyze-performance.md (1)

10-10: Add language specifiers to code blocks and wrap bare URLs.

Markdown linting flagged code blocks without language specifiers and bare URLs. Change ``` to ```bash for shell snippets (lines 10, 384, 389, 486). Wrap bare URLs in angle brackets or convert to markdown links (lines 36, 588–589).

Also applies to: 36-36, 384-384, 389-389, 486-486, 588-589

plugins/etcd/commands/health-check.md (2)

22-22: Fix heading level hierarchy.

Line 22 uses heading level h3 (### 5. Check Etcd Member List) but should increment from h2. Ensure all section headings follow proper nesting (start with h2 and increment by one level at a time).


10-10: Add language specifiers to code blocks and wrap bare URLs.

Markdown linting flagged code blocks without language specifiers and bare URLs. Change ``` to ```bash for shell snippets (lines 10, 330, 335, 377). Wrap bare URLs in angle brackets or convert to markdown links (lines 450–451).

Also applies to: 330-335, 377-377, 450-451

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 9da6fe7 and 029f25b.

📒 Files selected for processing (7)
  • .claude-plugin/marketplace.json (1 hunks)
  • PLUGINS.md (2 hunks)
  • docs/data.json (1 hunks)
  • plugins/etcd/.claude-plugin/plugin.json (1 hunks)
  • plugins/etcd/README.md (1 hunks)
  • plugins/etcd/commands/analyze-performance.md (1 hunks)
  • plugins/etcd/commands/health-check.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • PLUGINS.md
  • plugins/etcd/.claude-plugin/plugin.json
  • .claude-plugin/marketplace.json
  • docs/data.json
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
plugins/etcd/commands/analyze-performance.md

10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


36-36: Bare URL used

(MD034, no-bare-urls)


384-384: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


389-389: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


486-486: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


588-588: Bare URL used

(MD034, no-bare-urls)


589-589: Bare URL used

(MD034, no-bare-urls)

plugins/etcd/README.md

23-23: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


28-28: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


44-44: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


49-49: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


58-58: Bare URL used

(MD034, no-bare-urls)


157-157: Bare URL used

(MD034, no-bare-urls)


158-158: Bare URL used

(MD034, no-bare-urls)


159-159: Bare URL used

(MD034, no-bare-urls)


164-164: Bare URL used

(MD034, no-bare-urls)

plugins/etcd/commands/health-check.md

22-22: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
plugins/etcd/commands/analyze-performance.md (1)

75-79: Argument parsing should handle both --duration <value> and --duration=<value> forms.

The current implementation only supports positional arguments and silently ignores combined forms like --duration=15, leading to the default 5-minute duration being used unexpectedly.

Consider using a more robust parsing loop:

 DURATION=5
-if [[ "$1" == "--duration" ]] && [[ -n "$2" ]]; then
-    DURATION=$2
-fi
+
+while [[ $# -gt 0 ]]; do
+  case "$1" in
+    --duration)
+      DURATION="${2:-5}"
+      shift 2
+      ;;
+    --duration=*)
+      DURATION="${1#*=}"
+      shift
+      ;;
+    *)
+      shift
+      ;;
+  esac
+done
+
+# Validate DURATION is numeric
+if ! [[ "$DURATION" =~ ^[0-9]+$ ]]; then
+  echo "Error: --duration must be a positive integer"
+  exit 1
+fi

This handles both --duration 15 and --duration=15, validates the input, and supports flags in any order.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 029f25b and 181ba12.

📒 Files selected for processing (7)
  • .claude-plugin/marketplace.json (1 hunks)
  • PLUGINS.md (2 hunks)
  • docs/data.json (1 hunks)
  • plugins/etcd/.claude-plugin/plugin.json (1 hunks)
  • plugins/etcd/README.md (1 hunks)
  • plugins/etcd/commands/analyze-performance.md (1 hunks)
  • plugins/etcd/commands/health-check.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/data.json
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
plugins/etcd/commands/health-check.md

22-22: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

plugins/etcd/README.md

23-23: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


28-28: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


44-44: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


49-49: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


58-58: Bare URL used

(MD034, no-bare-urls)


157-157: Bare URL used

(MD034, no-bare-urls)


158-158: Bare URL used

(MD034, no-bare-urls)


159-159: Bare URL used

(MD034, no-bare-urls)


164-164: Bare URL used

(MD034, no-bare-urls)

plugins/etcd/commands/analyze-performance.md

10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


36-36: Bare URL used

(MD034, no-bare-urls)


384-384: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


389-389: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


486-486: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


588-588: Bare URL used

(MD034, no-bare-urls)


589-589: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (4)
plugins/etcd/.claude-plugin/plugin.json (1)

1-8: Plugin metadata looks good.

Simple, clean plugin descriptor. No issues.

PLUGINS.md (1)

65-73: Documentation entry is clear and consistent.

The etcd plugin entry follows the established format, clearly describes the two commands, and properly links to detailed documentation.

.claude-plugin/marketplace.json (1)

67-71: Plugin registry entry is well-formed.

Consistent with existing marketplace entries, properly configured source path, and descriptive name.

plugins/etcd/README.md (1)

1-170: Comprehensive and well-structured README.

Excellent user-facing documentation that clearly explains the plugin's purpose, documents both commands with examples, and provides troubleshooting guidance. The performance benchmarks are helpful for understanding etcd health thresholds.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (3)
plugins/etcd/commands/health-check.md (2)

10-10: Add language specifiers to bash code blocks for syntax highlighting.

Markdown linting flags missing language specifiers. Change ``` to ```bash at lines 10, 330, 335, and 377.

Also applies to: 330-330, 335-335, 377-377


60-74: Initialize and parse WARNINGS and VERBOSE variables to enable --verbose flag.

The script references $WARNINGS (line 305) and $VERBOSE (line 265) variables that are never initialized or parsed from arguments. The documented --verbose flag is non-functional, and warning tracking does not work.

Apply this fix to initialize variables and parse arguments:

 if ! oc whoami &> /dev/null; then
     echo "Error: Not connected to an OpenShift cluster."
     exit 1
 fi
+
+# Initialize variables and parse arguments
+WARNINGS=0
+VERBOSE=false
+
+while [[ $# -gt 0 ]]; do
+  case "$1" in
+    --verbose|-v)
+      VERBOSE=true
+      shift
+      ;;
+    *)
+      shift
+      ;;
+  esac
+done

Then increment WARNINGS at each warning condition:

 if [ "$MEMBER_COUNT" -lt 3 ]; then
     echo "WARNING: Etcd cluster has less than 3 members (quorum at risk)"
+    WARNINGS=$((WARNINGS + 1))
 fi
 if [ "$UNSTARTED" -gt 0 ]; then
     echo "WARNING: $UNSTARTED member(s) in unstarted state"
+    WARNINGS=$((WARNINGS + 1))
 fi
 if [ "$DISK_USAGE" -gt 80 ]; then
     echo "WARNING: Disk usage on $pod is ${DISK_USAGE}% (threshold: 80%)"
+    WARNINGS=$((WARNINGS + 1))
 fi

Finally, fix the exit logic to properly signal status:

 if [ "$WARNINGS" -gt 0 ]; then
     echo "Status: WARNING - Found $WARNINGS warnings requiring attention"
-    exit 0
+    exit 1
 else
     echo "Status: ✓ HEALTHY - All checks passed"
     exit 0
 fi

Based on learnings from past review comments, these were flagged as critical in previous iterations.

plugins/etcd/commands/analyze-performance.md (1)

10-10: Add language specifiers to code blocks and wrap bare URLs.

Markdown linting flags:

  • Missing language specifiers: change ``` to ```bash at lines 10, 384, 389, 486
  • Bare URLs: wrap in angle brackets <https://...> at lines 588–589

Also applies to: 384-384, 389-389, 486-486, 588-589

🧹 Nitpick comments (2)
plugins/etcd/README.md (1)

23-23: Address markdown linting issues: language specifiers and bare URLs.

The markdownlint tool flags missing language specifiers on code blocks and bare URLs. While not breaking, these should be fixed for consistency.

Suggested fixes:

  1. Add language specifiers to code blocks: change ``` to ```bash for shell examples (lines 23, 28, 44, 49)
  2. Wrap bare URLs in angle brackets: <https://...> for lines 58, 157–159, 164

Also applies to: 28-28, 44-44, 49-49, 58-58, 157-159, 164-164

plugins/etcd/commands/analyze-performance.md (1)

75-79: Improve argument parsing to handle both --duration <minutes> and --duration=<minutes> formats.

The current parsing only handles positional arguments and is fragile. Users might naturally try --duration=15 or pass arguments in different orders. A more robust parser would improve usability.

Apply this more robust argument parsing:

 # Parse duration argument (default: 5 minutes)
 DURATION=5
-if [[ "$1" == "--duration" ]] && [[ -n "$2" ]]; then
-    DURATION=$2
-fi
+
+while [[ $# -gt 0 ]]; do
+  case "$1" in
+    --duration)
+      if [[ -n "$2" && "$2" =~ ^[0-9]+$ ]]; then
+        DURATION="$2"
+        shift 2
+      else
+        echo "Error: --duration requires a numeric value"
+        exit 1
+      fi
+      ;;
+    --duration=*)
+      DURATION="${1#*=}"
+      if ! [[ "$DURATION" =~ ^[0-9]+$ ]]; then
+        echo "Error: --duration requires a numeric value"
+        exit 1
+      fi
+      shift
+      ;;
+    *)
+      shift
+      ;;
+  esac
+done

This handles --duration 15, --duration=15, and validates numeric input.

Based on learnings from past review comments, this was flagged as a major concern in previous iterations.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 181ba12 and 8a183de.

📒 Files selected for processing (8)
  • .claude-plugin/marketplace.json (1 hunks)
  • .github/workflows/lint-plugins.yml (1 hunks)
  • PLUGINS.md (2 hunks)
  • docs/data.json (1 hunks)
  • plugins/etcd/.claude-plugin/plugin.json (1 hunks)
  • plugins/etcd/README.md (1 hunks)
  • plugins/etcd/commands/analyze-performance.md (1 hunks)
  • plugins/etcd/commands/health-check.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • PLUGINS.md
  • plugins/etcd/.claude-plugin/plugin.json
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
plugins/etcd/README.md

23-23: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


28-28: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


44-44: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


49-49: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


58-58: Bare URL used

(MD034, no-bare-urls)


157-157: Bare URL used

(MD034, no-bare-urls)


158-158: Bare URL used

(MD034, no-bare-urls)


159-159: Bare URL used

(MD034, no-bare-urls)


164-164: Bare URL used

(MD034, no-bare-urls)

plugins/etcd/commands/analyze-performance.md

10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


36-36: Bare URL used

(MD034, no-bare-urls)


384-384: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


389-389: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


486-486: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


588-588: Bare URL used

(MD034, no-bare-urls)


589-589: Bare URL used

(MD034, no-bare-urls)

plugins/etcd/commands/health-check.md

10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


33-33: Bare URL used

(MD034, no-bare-urls)


330-330: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


335-335: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


377-377: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


450-450: Bare URL used

(MD034, no-bare-urls)


451-451: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (6)
.github/workflows/lint-plugins.yml (2)

20-24: Debug step improves troubleshooting without blocking workflow.

The debug step conditionally displays workspace contents for troubleshooting. The || true clauses ensure the workflow doesn't fail if directories are missing.


29-29: Correct quoting protects against paths with spaces.

Quoting the volume mount path ensures proper handling of workspace paths containing spaces or special characters.

.claude-plugin/marketplace.json (1)

67-71: Plugin marketplace entry is well-formed.

The etcd plugin entry follows the marketplace structure with correct namespace, source path, and description.

plugins/etcd/README.md (1)

1-171: README documentation is comprehensive and well-organized.

The plugin documentation covers prerequisites, commands, installation, use cases, troubleshooting, security, and resources. Content is clear and actionable.

docs/data.json (2)

525-545: Plugin registry entry is correctly structured.

The etcd plugin entry follows the registry format with valid metadata, command definitions, and alignment with command documentation files.


1-634: Ignore this review comment—the file contains exactly one etcd entry, not duplicates.

The grep verification confirms there is only one "name": "etcd" entry in docs/data.json. The premise of the review comment (that duplicate etcd entries exist) is unsupported by evidence.

Likely an incorrect or invalid review comment.

Comment on lines +265 to +283
if [ "$VERBOSE" = "true" ]; then
echo ""
echo "Checking etcd performance metrics..."

# Get metrics from etcd pod
METRICS=$(oc exec -n openshift-etcd "$ETCD_POD" -c etcd -- curl -s http://localhost:2379/metrics 2>/dev/null)

# Parse key metrics
echo "Backend Commit Duration (p99):"
echo "$METRICS" | grep "etcd_disk_backend_commit_duration_seconds" | grep "quantile=\"0.99\"" | head -1

echo ""
echo "WAL Fsync Duration (p99):"
echo "$METRICS" | grep "etcd_disk_wal_fsync_duration_seconds" | grep "quantile=\"0.99\"" | head -1

echo ""
echo "Leader Changes:"
echo "$METRICS" | grep "etcd_server_leader_changes_seen_total" | head -1
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Verbose metrics block will never execute without VERBOSE initialization fix.

The conditional block at line 265 checks if [ "$VERBOSE" = "true" ], but the variable is never initialized. Apply the initialization fix above to enable this functionality.

🤖 Prompt for AI Agents
In plugins/etcd/commands/health-check.md around lines 265 to 283, the VERBOSE
conditional will never run because VERBOSE is never initialized; initialize
VERBOSE earlier (above this block) by setting a default and/or parsing a verbose
flag (e.g., set VERBOSE from an environment variable or CLI option and default
it to "false" when unset), or add simple initialization like
VERBOSE=${VERBOSE:-false} so the conditional can evaluate to "true" when
intended; ensure any flag parsing sets VERBOSE="true" when the user requests
verbose output.

Comment on lines +305 to +311
if [ "$WARNINGS" -gt 0 ]; then
echo "Status: WARNING - Found $WARNINGS warnings requiring attention"
exit 0
else
echo "Status: HEALTHY - All checks passed"
exit 0
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix exit code logic to distinguish warnings from healthy status.

Both the WARNING and HEALTHY branches return exit 0, preventing proper status signaling. Update the exit logic (as shown in the above diff) to return exit 1 for warnings so downstream automation can properly detect and act on warnings.

🤖 Prompt for AI Agents
In plugins/etcd/commands/health-check.md around lines 305 to 311, the script
currently exits with 0 for both WARNING and HEALTHY branches; change the WARNING
branch to exit 1 so warnings produce a non-zero exit code for downstream
automation to detect, leaving the HEALTHY branch as exit 0 and preserving the
echo messages.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (2)
plugins/etcd/commands/analyze-performance.md (1)

10-10: Add language specifiers to code blocks for syntax highlighting.

Multiple Markdown fenced code blocks lack language specifiers. Update plain ``` to ```bash for all shell/bash code blocks throughout the file.

Also applies to: 64-82, 384-389, 486-488

plugins/etcd/commands/health-check.md (1)

10-10: Add language specifiers to code blocks.

Multiple Markdown fenced code blocks lack language specifiers. Update plain ``` to ```bash for shell code blocks.

Also applies to: 330-330, 335-335, 377-377

🧹 Nitpick comments (3)
plugins/etcd/commands/analyze-performance.md (2)

36-36: Wrap bare URLs in Markdown links.

Bare URLs should be wrapped in Markdown link syntax for proper rendering. Example: [etcd tuning guide](https://etcd.io/docs/latest/tuning/)

Also applies to: 588-589


75-79: Improve --duration argument parsing to handle both flag formats.

The current implementation assumes positional arguments (--duration at $1 and value at $2) but does not handle the combined form --duration=<minutes> or args in different order. The documentation specifies [--duration <minutes>], which implies flexibility.

Implement robust argument parsing using a loop over "$@" to detect both --duration <value> and --duration=<value>, validate the value is numeric, and maintain backward compatibility:

DURATION=5

while [[ $# -gt 0 ]]; do
  case "$1" in
    --duration)
      DURATION="$2"
      shift 2
      ;;
    --duration=*)
      DURATION="${1#*=}"
      shift
      ;;
    *)
      shift
      ;;
  esac
done

# Validate DURATION is numeric
if ! [[ "$DURATION" =~ ^[0-9]+$ ]]; then
  echo "Error: Duration must be a positive integer (in minutes)"
  exit 1
fi
plugins/etcd/commands/health-check.md (1)

33-33: Wrap bare URLs in Markdown links.

Bare URLs should be wrapped in Markdown link syntax. Example: [etcd documentation](https://etcd.io/docs/)

Also applies to: 450-451

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 8a183de and 7281978.

📒 Files selected for processing (8)
  • .claude-plugin/marketplace.json (1 hunks)
  • .github/workflows/lint-plugins.yml (1 hunks)
  • PLUGINS.md (2 hunks)
  • docs/data.json (1 hunks)
  • plugins/etcd/.claude-plugin/plugin.json (1 hunks)
  • plugins/etcd/README.md (1 hunks)
  • plugins/etcd/commands/analyze-performance.md (1 hunks)
  • plugins/etcd/commands/health-check.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • docs/data.json
  • .github/workflows/lint-plugins.yml
  • plugins/etcd/.claude-plugin/plugin.json
  • plugins/etcd/README.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
plugins/etcd/commands/health-check.md

10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


33-33: Bare URL used

(MD034, no-bare-urls)


330-330: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


335-335: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


377-377: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


450-450: Bare URL used

(MD034, no-bare-urls)


451-451: Bare URL used

(MD034, no-bare-urls)

plugins/etcd/commands/analyze-performance.md

10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


36-36: Bare URL used

(MD034, no-bare-urls)


384-384: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


389-389: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


486-486: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


588-588: Bare URL used

(MD034, no-bare-urls)


589-589: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (2)
PLUGINS.md (1)

9-9: Clean addition to plugin index and documentation.

The Etcd plugin section is properly integrated with consistent formatting, clear command descriptions, and correct cross-references to the README.

Also applies to: 65-73

.claude-plugin/marketplace.json (1)

67-71: Etcd plugin marketplace entry looks good.

Properly formatted and consistent with other plugin entries.

Comment on lines +50 to +54
- **--verbose** (optional): Enable detailed output
- Shows etcd member details
- Displays performance metrics
- Includes log snippets for errors
- Provides additional diagnostic information
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Initialize VERBOSE variable and implement --verbose flag parsing; fix exit code logic.

The script references $VERBOSE at line 265 but never initializes it or parses the --verbose flag documented at lines 50-54. Additionally, both the WARNING and HEALTHY branches return exit 0, preventing downstream automation from detecting warnings.

Apply this comprehensive fix:

# Add after the oc connection check (after line 72)
WARNINGS=0
VERBOSE=false

# Parse --verbose argument
while [[ $# -gt 0 ]]; do
  case "$1" in
    --verbose|-v)
      VERBOSE=true
      shift
      ;;
    *)
      shift
      ;;
  esac
done

Then update the exit logic at lines 305-311 to distinguish warnings from healthy:

 if [ "$WARNINGS" -gt 0 ]; then
     echo "Status: WARNING - Found $WARNINGS warnings requiring attention"
-    exit 0
+    exit 1
 else
     echo "Status: ✓ HEALTHY - All checks passed"
     exit 0
 fi

Also applies to: 60-74, 265-283, 305-311

🤖 Prompt for AI Agents
In plugins/etcd/commands/health-check.md around lines 60-74, 265-283 and
305-311, the script never initializes VERBOSE nor parses the documented
--verbose/-v flag and the current exit logic returns 0 for both WARNING and
HEALTHY; initialize WARNINGS=0 and VERBOSE=false immediately after the oc
connection check (after line 72), add a simple while/case loop to consume
arguments and set VERBOSE=true when --verbose or -v is passed, then change the
final exit behavior so a WARNING state exits non‑zero (e.g., exit 1) while
HEALTHY exits 0, and ensure any checks that reference $VERBOSE use the
initialized variable to avoid unbound variable errors.

Comment on lines +60 to +74
### 1. Verify Prerequisites

Check if oc CLI is available and cluster is accessible:

```bash
if ! command -v oc &> /dev/null; then
echo "Error: oc CLI not found. Please install OpenShift CLI."
exit 1
fi

if ! oc whoami &> /dev/null; then
echo "Error: Not connected to an OpenShift cluster."
exit 1
fi
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Initialize WARNINGS variable and increment at each warning condition.

The script references $WARNINGS at line 305 for the summary but never initializes or increments it. This causes undefined variable behavior. Initialize WARNINGS=0 early in the script and increment it at each warning condition:

# Add after the oc connection check (after line 72)
WARNINGS=0

Then increment WARNINGS at each warning condition:

 if [ "$MEMBER_COUNT" -lt 3 ]; then
     echo "WARNING: Etcd cluster has less than 3 members (quorum at risk)"
+    WARNINGS=$((WARNINGS + 1))
 fi

 if [ "$UNSTARTED" -gt 0 ]; then
     echo "WARNING: $UNSTARTED member(s) in unstarted state"
+    WARNINGS=$((WARNINGS + 1))
 fi

 if [ "$DISK_USAGE" -gt 80 ]; then
     echo "WARNING: Disk usage on $pod is ${DISK_USAGE}% (threshold: 80%)"
+    WARNINGS=$((WARNINGS + 1))
 fi

 if [ "$CURRENT_SIZE" -gt "$MAX_DB_SIZE" ]; then
     echo "WARNING: Etcd database size ($CURRENT_SIZE bytes) exceeds recommended maximum (8GB)"
+    WARNINGS=$((WARNINGS + 1))
 fi

Also applies to: 155-155, 161-161, 236-236, 305-311

🤖 Prompt for AI Agents
In plugins/etcd/commands/health-check.md around lines 60 to 74 and affecting
lines 155, 161, 236, and 305-311, the script uses the WARNINGS variable in the
summary but never initializes or increments it; initialize WARNINGS=0
immediately after the oc CLI/cluster checks (around line 72) and update each
warning-producing conditional at the referenced lines to increment WARNINGS
(e.g., WARNINGS=$((WARNINGS+1))) whenever a warning is emitted so the final
summary reflects the correct count.

@stbenjam
Copy link
Member

stbenjam commented Nov 24, 2025

make update has changed since you first created the PR, you need to rebase on main before running locally.

CodeRabbit's comments look legitimate and worth fixing

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 24, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (5)
plugins/etcd/commands/analyze-performance.md (2)

9-12: Add language specifiers to fenced code blocks and clean up links

Several code fences are bare triple backticks (no language), and markdownlint flags them (MD040). For CLI examples and outputs:

  • Use bash for invocations:
-## Synopsis
-```
-/etcd:analyze-performance [--duration <minutes>]
-```
+## Synopsis
+```bash
+/etcd:analyze-performance [--duration <minutes>]
+```
  • Use bash for shell snippets, text (or console) for long sample outputs.

Also, the “See Also” section uses bare URLs; consider converting them to Markdown links, e.g.:

-- Etcd performance guide: https://etcd.io/docs/latest/tuning/
+- Etcd performance guide: [https://etcd.io/docs/latest/tuning/](https://etcd.io/docs/latest/tuning/)

Repeat for the OpenShift docs URL.

Also applies to: 384-387, 388-483, 486-488, 588-589


1-4: Fix argument-hint quoting and harden --duration parsing with validation

The frontmatter and duration argument parsing have multiple issues:

  1. Line 3: argument-hint: "[--duration <minutes>]" uses quotes, which renders as escaped quotes in downstream data structures.
  2. Lines 75-79: Duration parsing only works when --duration is the first argument and fails to:
    • Accept --duration=15 form
    • Validate numeric input
    • Handle flags in any order

Fix line 3:

-argument-hint: "[--duration <minutes>]"
+argument-hint: [--duration <minutes>]

Fix lines 75-79:

-# Parse duration argument (default: 5 minutes)
-DURATION=5
-if [[ "$1" == "--duration" ]] && [[ -n "$2" ]]; then
-    DURATION=$2
-fi
+# Parse duration argument (default: 5 minutes)
+DURATION=5
+while [[ $# -gt 0 ]]; do
+  case "$1" in
+    --duration)
+      shift
+      if [[ -z "$1" ]] || ! [[ "$1" =~ ^[0-9]+$ ]]; then
+        echo "Error: --duration requires an integer value (minutes)" >&2
+        exit 1
+      fi
+      DURATION="$1"
+      ;;
+    --duration=*)
+      VALUE="${1#--duration=}"
+      if ! [[ "$VALUE" =~ ^[0-9]+$ ]]; then
+        echo "Error: --duration must be an integer (minutes)" >&2
+        exit 1
+      fi
+      DURATION="$VALUE"
+      ;;
+  esac
+  shift
+done

This supports both --duration 15 and --duration=15, validates input as integer, and allows flags in any order.

plugins/etcd/commands/health-check.md (3)

305-311: Consider using a non-zero exit code when warnings are present

Currently:

if [ "$WARNINGS" -gt 0 ]; then
    echo "Status: WARNING - Found $WARNINGS warnings requiring attention"
    exit 0
else
    echo "Status: HEALTHY - All checks passed"
    exit 0
fi

and the docs say exit code 0 “may have warnings”. If this command is used in automation where warnings should be surfaced distinctly from a clean bill of health, you may want to return a non-zero code for warnings (e.g., exit 2) and update the “Return Value” section accordingly.

If you intentionally prefer “warnings but still exit 0”, consider clarifying that in the docs as an explicit design choice.

Also applies to: 316-320


9-12: Align code fences with markdownlint and add link formatting

markdownlint is flagging:

  • Fenced blocks without a language (MD040) around the synopsis and examples.
  • Bare URLs in the prereqs and “See Also” section (MD034).

Suggested tweaks:

  • Use language hints for CLI examples:
-## Synopsis
-```
-/etcd:health-check [--verbose]
-```
+## Synopsis
+```bash
+/etcd:health-check [--verbose]
+```

-### Example 1: Basic health check
-```
-/etcd:health-check
-```
+### Example 1: Basic health check
+```bash
+/etcd:health-check
+```

(and similarly for the verbose example and sample output blocks, using bash or text).

  • Convert bare URLs to Markdown links, e.g.:
-- Etcd documentation: https://etcd.io/docs/
+- Etcd documentation: [https://etcd.io/docs/](https://etcd.io/docs/)

and likewise for the OpenShift docs URL.

Also applies to: 329-333, 334-336, 377-379, 450-451


2-4: Initialize and track WARNINGS, parse --verbose, and define VERBOSE

There are a few interrelated issues in the implementation:

  • WARNINGS is read in the summary (if [ "$WARNINGS" -gt 0 ]; then) but never initialized or incremented in any of the warning branches, so:
    • Bash prints integer expression expected and the condition always falls through to the “HEALTHY” branch.
    • The summary will always report 0 warnings regardless of earlier WARNING: messages.
  • VERBOSE is used in if [ "$VERBOSE" = "true" ]; then but is never set, and the documented --verbose flag is never parsed, so verbose mode can’t be enabled.
  • argument-hint in the frontmatter is quoted, which propagates as extra quotes in docs/data.json.

Suggested fixes:

  1. Unquote the argument hint in frontmatter:
-argument-hint: "[--verbose]"
+argument-hint: [--verbose]
  1. After the cluster connection check, initialize and parse flags:
-if ! oc whoami &> /dev/null; then
-    echo "Error: Not connected to an OpenShift cluster."
-    exit 1
-fi
+if ! oc whoami &> /dev/null; then
+    echo "Error: Not connected to an OpenShift cluster."
+    exit 1
+fi
+
+# Initialize counters and flags
+WARNINGS=0
+VERBOSE=false
+
+# Parse optional flags (currently only --verbose / -v)
+while [[ $# -gt 0 ]]; do
+  case "$1" in
+    --verbose|-v)
+      VERBOSE=true
+      ;;
+    *)
+      # Ignore unknown args for now
+      ;;
+  esac
+  shift
+done
  1. Increment WARNINGS wherever you emit a WARNING::
 if [ "$MEMBER_COUNT" -lt 3 ]; then
     echo "WARNING: Etcd cluster has less than 3 members (quorum at risk)"
+    WARNINGS=$((WARNINGS + 1))
 fi

 if [ "$UNSTARTED" -gt 0 ]; then
     echo "WARNING: $UNSTARTED member(s) in unstarted state"
+    WARNINGS=$((WARNINGS + 1))
 fi

 if [ "$DISK_USAGE" -gt 80 ]; then
     echo "WARNING: Disk usage on $pod is ${DISK_USAGE}% (threshold: 80%)"
+    WARNINGS=$((WARNINGS + 1))
 fi

 if [ "$CURRENT_SIZE" -gt "$MAX_DB_SIZE" ]; then
     echo "WARNING: Etcd database size ($CURRENT_SIZE bytes) exceeds recommended maximum (8GB)"
     echo "Consider defragmentation or checking for excessive key growth"
+    WARNINGS=$((WARNINGS + 1))
 fi

With these changes, the summary’s warning count and the --verbose behavior will match the documentation.

#!/bin/bash
# Verify that WARNINGS and VERBOSE are not referenced elsewhere without initialization.
rg -n "WARNINGS|VERBOSE" plugins/etcd/commands/health-check.md -n -C3

Also applies to: 148-162, 210-217, 225-237, 260-283, 291-311

🧹 Nitpick comments (3)
plugins/etcd/README.md (1)

22-31: Fix markdownlint issues: add code block languages and avoid bare URLs

To keep docs passing markdownlint and improve readability:

  • Add language specifiers to CLI/example code fences, e.g.:
-**Usage:**
-```
-/etcd:health-check [--verbose]
-```
+**Usage:**
+```bash
+/etcd:health-check [--verbose]
+```

-**Example:**
-```
-/etcd:health-check
-/etcd:health-check --verbose
-```
+**Example:**
+```bash
+/etcd:health-check
+/etcd:health-check --verbose
+```
  • Do similarly for the /etcd:analyze-performance usage/examples.

  • Replace bare URLs with proper links to satisfy MD034, e.g.:

-1. **OpenShift CLI (oc)** - Install from https://mirror.openshift.com/pub/openshift-v4/clients/ocp/
+1. **OpenShift CLI (oc)** - Install from [OpenShift CLI downloads](https://mirror.openshift.com/pub/openshift-v4/clients/ocp/)

and likewise in the Resources and Contributing sections.

Also applies to: 43-52, 56-60, 157-165

plugins/etcd/commands/analyze-performance.md (1)

31-49: Document additional CLI prerequisites used by the script (jq, bc)

The implementation relies on tools beyond oc, for example:

  • jq for JSON parsing (jq -r in the DB status and fragmentation sections).
  • bc for numeric comparisons (bc -l in the fragmentation checks, computing MB sizes).

These are not mentioned in the Prerequisites section. To avoid runtime surprises on systems where they’re not installed, consider explicitly documenting them, e.g.:

-1. **OpenShift CLI (oc)**
+1. **OpenShift CLI (oc)**
    - Install from: …
    - Verify with: `oc version`
+
+2. **jq and bc utilities**
+   - Required for JSON parsing and numeric calculations
+   - Verify with: `jq --version` and `bc --version`

(and renumber the remaining items).

Also applies to: 100-142, 291-349

plugins/etcd/commands/health-check.md (1)

32-43: Document jq and curl as prerequisites

The health-check implementation assumes jq and curl are available:

  • jq is used multiple times to parse etcdctl JSON.
  • curl is used to fetch metrics from http://localhost:2379/metrics.

They’re not mentioned in the “Prerequisites” section, which may surprise users running on minimal environments. Consider explicitly listing them, e.g.:

-3. **Cluster admin permissions**
+3. **Cluster admin permissions**
    - Required to access etcd pods and execute commands
    - Verify with: `oc auth can-i get pods -n openshift-etcd`
+
+4. **jq and curl utilities**
+   - Required for JSON parsing (`jq`) and metrics collection (`curl`)
+   - Verify with: `jq --version` and `curl --version`
+
-4. **Healthy etcd namespace**
-   - The openshift-etcd namespace must exist
-   - At least one etcd pod must be running
+5. **Healthy etcd namespace**
+   - The openshift-etcd namespace must exist
+   - At least one etcd pod must be running

This makes operational requirements explicit.

Also applies to: 189-213, 247-251, 269-283

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 7281978 and 89c6e0e.

📒 Files selected for processing (9)
  • .claude-plugin/marketplace.json (1 hunks)
  • .github/workflows/lint-plugins.yml (1 hunks)
  • PLUGINS.md (2 hunks)
  • docs/data.json (1 hunks)
  • plugins/etcd/.claude-plugin/plugin.json (1 hunks)
  • plugins/etcd/README.md (1 hunks)
  • plugins/etcd/commands/analyze-performance.md (1 hunks)
  • plugins/etcd/commands/health-check.md (1 hunks)
  • scripts/build-website.py (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • plugins/etcd/.claude-plugin/plugin.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/lint-plugins.yml
  • PLUGINS.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
plugins/etcd/README.md

23-23: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


28-28: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


44-44: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


49-49: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


58-58: Bare URL used

(MD034, no-bare-urls)


157-157: Bare URL used

(MD034, no-bare-urls)


158-158: Bare URL used

(MD034, no-bare-urls)


159-159: Bare URL used

(MD034, no-bare-urls)


164-164: Bare URL used

(MD034, no-bare-urls)

plugins/etcd/commands/analyze-performance.md

10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


36-36: Bare URL used

(MD034, no-bare-urls)


384-384: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


389-389: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


486-486: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


588-588: Bare URL used

(MD034, no-bare-urls)


589-589: Bare URL used

(MD034, no-bare-urls)

plugins/etcd/commands/health-check.md

10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


33-33: Bare URL used

(MD034, no-bare-urls)


330-330: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


335-335: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


377-377: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


450-450: Bare URL used

(MD034, no-bare-urls)


451-451: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (3)
scripts/build-website.py (1)

145-146: Deterministic JSON output looks good

Enabling sort_keys=True improves reproducibility of docs/data.json without changing its structure or values; this is a safe, beneficial change for diffs and tests.

.claude-plugin/marketplace.json (1)

67-71: Etcd marketplace entry is consistent and well-scoped

The new etcd plugin entry matches the repository layout (./plugins/etcd) and description aligns with the README; structure of marketplace.json remains consistent.

docs/data.json (1)

6-452: Expanded plugin metadata looks consistent with generator script

The additions of argument_hint, has_readme, name, and version across existing plugins (git, jira, ci, openshift, etc.) match the structure produced by build_website_data() and make the catalog more informative without changing semantics. Command names and synopses align with their respective plugins’ docs.

Comment on lines +528 to +538
"argument_hint": "\"[--duration <minutes>]\"",
"description": "Analyze etcd performance metrics, latency, and identify bottlenecks",
"name": "analyze-performance",
"synopsis": "/etcd:analyze-performance [--duration <minutes>]"
},
{
"argument_hint": "\"[--verbose]\"",
"description": "Check etcd cluster health, member status, and identify issues",
"name": "health-check",
"synopsis": "/etcd:health-check [--verbose]"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove extra quoting from etcd argument_hint values

For the new etcd plugin commands, the argument_hint fields include literal quotes:

"argument_hint": "\"[--duration <minutes>]\"",
...
"argument_hint": "\"[--verbose]\"",

This likely comes from quoted argument-hint values in the markdown frontmatter and will render with stray quotes in UIs.

Once you unquote the frontmatter (e.g., argument-hint: [--duration <minutes>] and argument-hint: [--verbose]), regenerate docs/data.json so these become:

-"argument_hint": "\"[--duration <minutes>]\"",
+"argument_hint": "[--duration <minutes>]",
...
-"argument_hint": "\"[--verbose]\"",
+"argument_hint": "[--verbose]",

which matches the style used by other plugins.

🤖 Prompt for AI Agents
In docs/data.json around lines 528-538 the etcd plugin entries have
argument_hint values that include literal quotes (e.g. "\"[--duration
<minutes>]\""), which causes stray quotes in UIs; update the source markdown
frontmatter to remove the quotes (use argument-hint: [--duration <minutes>] and
argument-hint: [--verbose] without surrounding quotes), then regenerate
docs/data.json so the argument_hint fields become unquoted strings (e.g.
"[--duration <minutes>"] matching the style used by other plugins.

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 24, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
docs/data.json (1)

645-645: Remove extra quoting from etcd argument_hint values.

As noted in a previous review, the etcd plugin has argument_hint fields with literal escaped quotes. This issue also affects the openshift and node-tuning plugins, suggesting a systematic problem with how quoted frontmatter values are parsed.

Update the source markdown frontmatter to remove the surrounding quotes, then regenerate docs/data.json.

Also applies to: 651-651

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 89c6e0e and 9766a03.

📒 Files selected for processing (4)
  • .claude-plugin/marketplace.json (1 hunks)
  • PLUGINS.md (2 hunks)
  • docs/data.json (1 hunks)
  • scripts/build-website.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • PLUGINS.md
  • .claude-plugin/marketplace.json
🔇 Additional comments (1)
scripts/build-website.py (1)

175-175: Good addition for reproducibility.

Adding sort_keys=True ensures deterministic JSON output, making diffs cleaner and version control more predictable.

},
{
"name": "cluster-health-check",
"argument_hint": "\"[--verbose] [--output-format]\"",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove extra quoting from openshift argument_hint values.

Similar to the etcd plugin, the openshift plugin has argument_hint fields with literal escaped quotes that will render incorrectly in UIs:

"argument_hint": "\"[--verbose] [--output-format]\"",
"argument_hint": "\"[release-image] [platform] [options]\"",
"argument_hint": "\"[install-dir]\"",

Update the source markdown frontmatter to remove the surrounding quotes (e.g., argument-hint: [--verbose] [--output-format]), then regenerate docs/data.json.

Also applies to: 599-599, 605-605

🤖 Prompt for AI Agents
In docs/data.json around lines 587, 599 and 605, the openshift plugin
argument_hint values contain literal escaped surrounding quotes (e.g.
"\"[--verbose] [--output-format]\"") which render incorrectly; edit the original
plugin markdown frontmatter to replace argument-hint: "\"[...]" entries with
unquoted argument-hint: [--verbose] [--output-format] (i.e., remove the
surrounding quotes and any escaping), then regenerate docs/data.json so the JSON
contains plain unquoted argument_hint values without escaped quotes.

"commands": [
{
"name": "analyze-node-tuning",
"argument_hint": "\"[--sosreport PATH] [--format json|markdown] [--max-irq-samples N]\"",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove extra quoting from node-tuning argument_hint values.

The node-tuning plugin also has argument_hint fields with literal escaped quotes:

"argument_hint": "\"[--sosreport PATH] [--format json|markdown] [--max-irq-samples N]\"",
"argument_hint": "\"[profile-name] [--summary ...] [--sysctl ...] [options]\"",

This is part of the systematic issue affecting multiple plugins. Update the source markdown frontmatter to remove the surrounding quotes, then regenerate docs/data.json.

Also applies to: 811-811

🤖 Prompt for AI Agents
In docs/data.json around lines 805 and 811, the node-tuning entries for
"argument_hint" contain literal escaped surrounding quotes (e.g. "\"[--sosreport
PATH] ...]\""); edit the source markdown frontmatter for the node-tuning
plugin(s) to remove the extra surrounding quotes so argument_hint is a plain
string without embedded quotes, then regenerate docs/data.json from the sources
so the JSON reflects the corrected values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants