Commit 8e286a7
Fix/array of objects and cloud docs check (#166)
* fix: Correctly render array-of-objects fields as empty arrays
Array-of-objects fields like client_certs[] were incorrectly rendered as
flat objects with all child properties expanded, creating invalid
configurations that mixed mutually exclusive options.
Changes:
- buildConfigYaml.js: Check field.kind === 'array' to detect array-of-objects
- renderObjectField.js: Same check for nested array-of-objects fields
- Now renders 'client_certs: []' instead of expanded object structure
This fixes 81 occurrences of client_certs plus other array-of-objects
fields like tools[], roles[], sasl[], etc.
Impact: 105 files changed in generated docs, removing 966 lines of
incorrect expanded structures.
Resolves issue where examples showed both inline (cert/key) and
file-based (cert_file/key_file) options together, violating the
documented 'either/or' constraint.
* feat: Check cloud-docs repo for missing cloud-supported connectors
Added logic to verify that all cloud-supported connectors (inCloud + cloudOnly)
have corresponding documentation pages in the cloud-docs repository.
Changes:
- Build set of cloud-supported connectors from binary analysis
- Use GitHub API to check if connector pages exist in cloud-docs
- Report missing connectors with their paths
- Runs automatically during draft-missing workflow (can be disabled)
The check uses GitHub API (via Octokit) to avoid cloning the cloud-docs repo.
Respects VBOT_GITHUB_API_TOKEN or GITHUB_TOKEN environment variables.
Also improved cloud-only connector detection:
- Cloud-only connectors now only check the cloud-only directory
- Regular connectors check pages and partials (not cloud-only)
This helps identify connectors that are available in Cloud but missing
documentation pages in the cloud-docs repository.
* fix: Surface non-404 errors in cloud-docs check
Update cloud-docs validation to record and report non-404 API errors
(auth, rate-limit, network) instead of silently ignoring them.
- Add cloudDocsErrors array to track non-404 failures
- Capture error status and message for each failure
- Report inconclusive check with error details when failures occur
- Only show success message when check completes without errors
- Provide troubleshooting guidance for common error causes
* fix: Preserve cloudOnly/requiresCgo flags and optimize octokit init
- Preserve cloudOnly and requiresCgo flags when building validConnectors
from dataObj so cloud-only connectors are properly detected
- Move Octokit initialization outside the loop to reuse connection
instead of creating a new instance for each connector check
* feat: Add raw URL fallback for cloud-docs validation
When GitHub API fails with auth/rate-limit errors, fall back to
checking raw.githubusercontent.com URLs via HTTP HEAD request.
Flow:
1. Try official API with authentication
2. If 404 -> file missing (expected)
3. If 403/401/rate-limit -> try raw URL fallback
- 200 -> file exists (success)
- 404 -> file missing (confirmed)
- Other -> record error with both API and fallback details
This allows validation to work even without GITHUB_TOKEN or when
rate-limited, while still preferring the official API when available.
* fix: Correct cloud-docs path and enable check without binary analysis
- Fix cloud-docs path from modules/components/pages to
modules/develop/pages/connect/components
- Fix plural type handling (inputs not inputss)
- Enable cloud-docs validation without binary analysis by checking
all non-deprecated connectors when binary data unavailable
- Reduces false positives from 282 to 64 actual missing connectors
* feat: Auto-load .env files and fix cloud-docs validation
Changes:
- Add dotenv package for automatic .env file loading
- Load .env files at startup in both CLI entry points
- Fix cloud-docs validation to only check actual connector types
Cloud-docs validation improvements:
- Filter out config types (config/*) - internal schemas only
- Filter out Bloblang functions/methods - documented on reference pages
- Filter out rate-limits - documented differently
- Only check: inputs, outputs, processors, caches, buffers, scanners, metrics, tracers
Result: Validation now correctly reports ~7 missing connectors instead of 252
Benefits:
- No more manual export of GITHUB_TOKEN needed
- Binary analysis works automatically with .env file
- Cloud-docs validation is accurate for connector coverage
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* docs: Auto-update CLI reference documentation (PR #166)
* fix: Skip deprecated connectors in cloud-docs validation
Deprecated connectors shouldn't be flagged as missing from cloud-docs.
This filter reduces false positives (e.g., pg_stream which is deprecated).
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* docs: Auto-update CLI reference documentation (PR #166)
* fix: Downgrade dotenv to v16 to suppress promotional messages
dotenv 17.x includes promotional stderr output that clutters CLI output.
Downgraded to 16.x which provides the same functionality without
the promotional messages.
* docs: Auto-update CLI reference documentation (PR #166)
* refactor: Consolidate Octokit instances into shared client
Creates a centralized Octokit client singleton in cli-utils/octokit-client.js
that is shared across all doc-tools modules. This eliminates redundant
initialization, shares rate limit tracking, and works without authentication
when no GitHub token is set.
Changes:
- Add cli-utils/octokit-client.js as shared singleton
- Update 7 modules to use shared client:
- tools/get-redpanda-version.js
- tools/get-console-version.js
- tools/fetch-from-github.js
- tools/cloud-regions/generate-cloud-regions.js
- extensions/generate-rp-connect-info.js
- tools/redpanda-connect/connector-binary-analyzer.js
- tools/redpanda-connect/rpcn-connector-docs-handler.js
- Configure auth only when token is available
- Simplify code by removing 38 lines of duplicate initialization
Benefits:
- Single initialization point for all GitHub API access
- Shared rate limit pool across modules
- Works without authentication (60 req/hr) or with token (5000 req/hr)
- Easier to maintain and update configuration
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>1 parent f1bfca7 commit 8e286a7
File tree
14 files changed
+256
-62
lines changed- bin
- cli-utils
- extensions
- tools
- cloud-regions
- redpanda-connect
- helpers
14 files changed
+256
-62
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
| 73 | + | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
21 | 8 | | |
22 | 9 | | |
23 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 26 | + | |
| 27 | + | |
33 | 28 | | |
34 | 29 | | |
35 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 22 | + | |
| 23 | + | |
29 | 24 | | |
30 | 25 | | |
31 | 26 | | |
| |||
0 commit comments