Skip to content

Conversation

@JakeSCahill
Copy link
Contributor

This pull request introduces several improvements and bug fixes to the Redpanda connector documentation tooling, primarily focused on handling cloud-only connectors, updating documentation instructions, and improving binary analysis accuracy. The changes ensure that cloud-only connectors are properly excluded from navigation and certain documentation outputs, instructions for writers are updated to use the correct attribute name, and the binary analysis process now uses unaugmented data for more reliable results.

Cloud-only connector handling:

  • Cloud-only connectors are now excluded from navigation updates in update-nav.js, with clear logging for skipped items.
  • When generating documentation and diffs, cloud-only connectors are filtered out from new component lists and "whats-new" updates, ensuring they only appear where appropriate. [1] [2] [3]

Binary analysis improvements:

  • The binary analyzer now uses a clean copy of OSS data (unaugmented) for comparison, avoiding false positives from augmented fields. Temporary file renaming and restoration logic was added to support this. [1] [2] [3]
  • Cloud-only connector details are now included in binary analysis output, enabling more precise filtering and reporting.

Documentation and writer instructions:

  • All documentation and writer instructions now use the correct attribute name :page-commercial-names: instead of :commercial-names: in README and PR summary outputs. [1] [2] [3] [4]
  • PR summary formatter now highlights cloud-supported connectors and provides explicit instructions for updating Redpanda Cloud documentation, including handling for cloud-only connectors.

General bug fixes and improvements:

  • Pluralization and phrasing in log messages and errors have been standardized for clarity. [1] [2] [3] [4]
  • Minor documentation and code comments have been updated for accuracy.

Version bump:

  • The package version is bumped from 4.13.2 to 4.13.3 in package.json.

@netlify
Copy link

netlify bot commented Jan 6, 2026

Deploy Preview for docs-extensions-and-macros ready!

Name Link
🔨 Latest commit 80612cc
🔍 Latest deploy log https://app.netlify.com/projects/docs-extensions-and-macros/deploys/695cda6066b110000802b3b6
😎 Deploy Preview https://deploy-preview-163--docs-extensions-and-macros.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 6, 2026

📝 Walkthrough

Walkthrough

This PR contains primarily textual and documentation updates across the codebase, focusing on standardizing pluralization in CLI help text, error messages, and documentation comments. Changes remove "(s)" notation in various messages (e.g., "surface(s)" becomes "surfaces", "error(s)" becomes "errors"). A minor comment is removed, and the package version is bumped from 4.13.2 to 4.13.3. The frontmatter attribute name in a README is updated from :commercial-names: to :page-commercial-names:. Several files in the redpanda-connect tooling extend existing logic to handle cloud-only connectors separately through filtering and augmentation, including cloud documentation update sections and binary analysis field expansion.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • paulohtb6
  • kbatuigas

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix Redpanda Connect cloud-only connector automation' directly addresses the main focus of the PR, which centers on fixing cloud-only connector handling in the Redpanda Connect documentation tooling.
Description check ✅ Passed The description comprehensively explains the changes, covering cloud-only connector handling, binary analysis improvements, documentation updates, bug fixes, and version bump, all of which are supported by the actual changeset.
Docstring Coverage ✅ Passed Docstring coverage is 90.91% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

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

@JakeSCahill JakeSCahill requested a review from paulohtb6 January 6, 2026 09:47
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: 0

🧹 Nitpick comments (2)
tools/redpanda-connect/rpcn-connector-docs-handler.js (2)

771-802: Redundant variable re-declaration on line 799.

The expectedPath variable is already defined on line 773 with the same value. The re-declaration inside the if (tempRenamed) block is unnecessary.

🔎 Proposed fix
     // Restore the augmented file
     if (tempRenamed) {
-      const expectedPath = path.join(dataDir, `connect-${newVersion}.json`)
       fs.unlinkSync(expectedPath)
       fs.renameSync(path.join(dataDir, `._connect-${newVersion}-augmented.json.tmp`), expectedPath)
     }

941-975: Consider extracting docRoots to avoid duplication.

The docRoots object is defined identically on lines 942-946 and again on lines 970-975. Consider extracting it to a single definition earlier in the function scope.

🔎 Proposed refactor

Define docRoots once before its first usage:

+  // Define doc roots for checking existing documentation
+  const docRoots = {
+    pages: path.resolve(process.cwd(), 'modules/components/pages'),
+    partials: path.resolve(process.cwd(), 'modules/components/partials/components'),
+    cloudOnly: path.resolve(process.cwd(), 'modules/components/partials/components/cloud-only')
+  }
+
   // Generate diff JSON
   let diffJson = null
   if (!oldVersion) {
     // ...
   } else {
     // ...
 
-    // Filter out components that already have documentation
-    const docRoots = {
-      pages: path.resolve(process.cwd(), 'modules/components/pages'),
-      partials: path.resolve(process.cwd(), 'modules/components/partials/components'),
-      cloudOnly: path.resolve(process.cwd(), 'modules/components/partials/components/cloud-only')
-    }

     if (diffJson.details && diffJson.details.newComponents) {
       // ... use docRoots
     }

     // Add new cgo-only components
     if (binaryAnalysis && binaryAnalysis.cgoOnly && binaryAnalysis.cgoOnly.length > 0) {
-      // Define roots for checking if docs already exist
-      const docRoots = {
-        pages: path.resolve(process.cwd(), 'modules/components/pages'),
-        partials: path.resolve(process.cwd(), 'modules/components/partials/components'),
-        cloudOnly: path.resolve(process.cwd(), 'modules/components/partials/components/cloud-only')
-      }
       // ... use docRoots
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d508242 and 80612cc.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (16)
  • CLI_REFERENCE.adoc
  • __tests__/tools/cgo-detection.test.js
  • bin/doc-tools-mcp.js
  • bin/doc-tools.js
  • bin/mcp-tools/generated-docs-review.js
  • bin/mcp-tools/mcp-validation.js
  • bin/mcp-tools/openapi.js
  • extensions/generate-rp-connect-categories.js
  • package.json
  • tools/bundle-openapi.js
  • tools/redpanda-connect/README.adoc
  • tools/redpanda-connect/connector-binary-analyzer.js
  • tools/redpanda-connect/pr-summary-formatter.js
  • tools/redpanda-connect/report-delta.js
  • tools/redpanda-connect/rpcn-connector-docs-handler.js
  • tools/redpanda-connect/update-nav.js
💤 Files with no reviewable changes (1)
  • extensions/generate-rp-connect-categories.js
🧰 Additional context used
🧬 Code graph analysis (3)
tools/redpanda-connect/connector-binary-analyzer.js (1)
__tests__/tools/cgo-detection.test.js (2)
  • cgoOnly (171-171)
  • cgoOnly (364-364)
tools/redpanda-connect/rpcn-connector-docs-handler.js (2)
tools/redpanda-connect/generate-rpcn-connector-docs.js (1)
  • isCloudOnly (399-399)
tools/redpanda-connect/report-delta.js (1)
  • oldCgoSet (232-232)
tools/redpanda-connect/pr-summary-formatter.js (2)
__tests__/tools/cgo-detection.test.js (1)
  • diffData (260-286)
tools/redpanda-connect/connector-binary-analyzer.js (2)
  • inCloud (348-348)
  • cloudOnly (350-350)
🔇 Additional comments (20)
tools/redpanda-connect/connector-binary-analyzer.js (1)

506-506: LGTM: Improved message clarity.

The pluralization update improves message consistency and readability.

tools/bundle-openapi.js (1)

554-554: LGTM: Accurate documentation improvement.

The plural form accurately reflects that this function can process multiple API surfaces ('admin', 'connect', or 'both').

__tests__/tools/cgo-detection.test.js (1)

396-396: LGTM: Consistent error messaging.

The pluralization update aligns with the broader consistency improvements across the codebase.

package.json (1)

3-3: LGTM: Appropriate patch version bump.

The patch version increment from 4.13.2 to 4.13.3 correctly follows semantic versioning for the textual improvements and bug fixes in this PR.

bin/mcp-tools/mcp-validation.js (1)

253-253: LGTM: Improved validation message clarity.

The plural form is always correct at this point since the code path requires results.errors.length > 0. This change improves consistency with the broader pluralization updates.

bin/doc-tools-mcp.js (1)

365-365: LGTM! Terminology improvement.

The change from "API surface(s)" to "API surfaces" improves readability and professionalism in the tool description. This aligns with the consistent pluralization effort across the codebase.

CLI_REFERENCE.adoc (1)

1077-1077: LGTM! Documentation consistency improvement.

The pluralization change aligns with the updated terminology in the CLI tool definitions, maintaining consistency between the auto-generated reference and the actual implementation.

bin/mcp-tools/openapi.js (2)

19-19: LGTM! JSDoc clarity improvement.

The parameter documentation change from "API surface(s)" to "API surfaces" improves readability while maintaining accuracy. This is part of the consistent pluralization effort across the codebase.


158-158: LGTM! Success message improvement.

The change from "API(s)" to "APIs" in the success summary makes the output message more natural and professional. This aligns with the pluralization consistency improvements throughout the PR.

bin/mcp-tools/generated-docs-review.js (1)

309-312: LGTM! Report text clarity improvement.

The removal of "(s)" notation in the Next Steps section makes the generated review reports more readable and professional. Using the plural form directly ("errors" and "warnings") is clearer since the actual count is displayed.

bin/doc-tools.js (1)

1633-1633: LGTM! CLI option description improvement.

The change from "Which API surface(s) to bundle" to "Which API surfaces to bundle" improves the help text clarity. This is the source definition that propagates to the auto-generated CLI reference documentation, ensuring consistency across all user-facing documentation.

tools/redpanda-connect/README.adoc (1)

668-689: LGTM! Consistent attribute name standardization.

The update from :commercial-names: to :page-commercial-names: aligns with the PR's goal of standardizing attribute naming across the codebase.

tools/redpanda-connect/update-nav.js (1)

193-209: LGTM! Clean filtering logic for cloud-only connectors.

The implementation correctly excludes cloud-only connectors from navigation updates while providing clear logging for transparency. The filter logic is straightforward and handles edge cases (undefined cloudOnly property) via truthiness check.

tools/redpanda-connect/report-delta.js (1)

250-255: LGTM! Consistent extension of binary analysis details.

The addition of cloudOnly follows the same pattern as cloudSupported and selfHostedOnly, with proper optional chaining and fallback to an empty array.

tools/redpanda-connect/pr-summary-formatter.js (3)

33-33: LGTM! Improved change detection logic.

Good enhancement to consider draftedConnectors as changes even when all summary stats are zero. This ensures PRs with only drafted connectors are properly flagged as having changes.


94-99: LGTM! Attribute name standardization.

Consistent update to use :page-commercial-names: across writer guidance.


104-165: LGTM! Comprehensive cloud docs update section.

The implementation correctly:

  • Guards against missing binaryAnalysis and binaryAnalysis.comparison
  • Identifies cloud-supported connectors by checking both inCloud and cloudOnly
  • Separates cloud-only connectors (needing partials syntax) from regular cloud connectors (needing page syntax)
  • Provides clear actionable instructions for writers

The conditional checks for cloudOnly existence (lines 116-117, 131-136) properly handle cases where the array may not be present.

tools/redpanda-connect/rpcn-connector-docs-handler.js (3)

151-173: LGTM! Proper filtering of cloud-only connectors from whats-new updates.

The logic correctly:

  • Filters out cloud-only connectors from the whats-new section (they shouldn't appear in OSS release notes)
  • Uses the updated path diff.binaryAnalysis?.details?.cgoOnly for CGO detection

664-683: LGTM! Clean OSS data generation for accurate binary analysis.

Creating a stripped copy of the connector data (removing cloudOnly connectors and augmentation fields) ensures the binary analyzer compares actual binary contents rather than previously augmented data. This prevents false positives in the comparison.


899-903: LGTM! Consistent pluralization and log message improvements.

The log message updates correctly pluralize terms ("connectors" vs "connector") and standardize phrasing across the codebase.

Also applies to: 1008-1013, 1041-1041

@JakeSCahill JakeSCahill merged commit 014729d into main Jan 6, 2026
5 checks passed
@JakeSCahill JakeSCahill deleted the rpcn-enhancemenrs branch January 6, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants