@redpanda-data/docs-extensions-and-macros 4.13.1 → 4.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/doc-tools-mcp.js +15 -3
- package/bin/doc-tools.js +767 -2088
- package/bin/mcp-tools/property-docs.js +18 -0
- package/bin/mcp-tools/rpcn-docs.js +28 -3
- package/cli-utils/antora-utils.js +53 -2
- package/cli-utils/dependencies.js +313 -0
- package/cli-utils/diff-utils.js +273 -0
- package/cli-utils/doc-tools-utils.js +54 -0
- package/extensions/algolia-indexer/generate-index.js +134 -102
- package/extensions/algolia-indexer/index.js +70 -38
- package/extensions/collect-bloblang-samples.js +2 -1
- package/extensions/generate-rp-connect-categories.js +126 -67
- package/extensions/generate-rp-connect-info.js +291 -137
- package/macros/rp-connect-components.js +34 -5
- package/package.json +4 -3
- package/tools/add-commercial-names.js +207 -0
- package/tools/generate-cli-docs.js +6 -2
- package/tools/get-console-version.js +5 -0
- package/tools/get-redpanda-version.js +5 -0
- package/tools/property-extractor/compare-properties.js +3 -3
- package/tools/property-extractor/generate-handlebars-docs.js +14 -14
- package/tools/property-extractor/generate-pr-summary.js +46 -0
- package/tools/property-extractor/pr-summary-formatter.js +375 -0
- package/tools/redpanda-connect/README.adoc +403 -38
- package/tools/redpanda-connect/connector-binary-analyzer.js +588 -0
- package/tools/redpanda-connect/generate-rpcn-connector-docs.js +97 -34
- package/tools/redpanda-connect/parse-csv-connectors.js +1 -1
- package/tools/redpanda-connect/pr-summary-formatter.js +601 -0
- package/tools/redpanda-connect/report-delta.js +69 -2
- package/tools/redpanda-connect/rpcn-connector-docs-handler.js +1180 -0
- package/tools/redpanda-connect/templates/connector.hbs +38 -0
- package/tools/redpanda-connect/templates/intro.hbs +0 -20
- package/tools/redpanda-connect/update-nav.js +205 -0
|
@@ -20,9 +20,9 @@ The Redpanda Connect automation is part of the https://github.com/redpanda-data/
|
|
|
20
20
|
* *Version tracking* and change reports
|
|
21
21
|
* *Category pages* organizing components by type
|
|
22
22
|
|
|
23
|
-
== For
|
|
23
|
+
== For writers
|
|
24
24
|
|
|
25
|
-
===
|
|
25
|
+
=== Quickstart
|
|
26
26
|
|
|
27
27
|
The Redpanda Connect automation is installed as part of the `docs-extensions-and-macros` npm package. You interact with it through the `doc-tools` CLI from within your documentation repository.
|
|
28
28
|
|
|
@@ -86,7 +86,7 @@ asciidoc:
|
|
|
86
86
|
npx doc-tools generate rpcn-connector-docs --fetch-connectors
|
|
87
87
|
|
|
88
88
|
# Output:
|
|
89
|
-
#
|
|
89
|
+
# Already at version 4.53.0
|
|
90
90
|
# No diff or version updates needed.
|
|
91
91
|
# (Still generates partials but skips diff/updates)
|
|
92
92
|
|
|
@@ -94,8 +94,8 @@ npx doc-tools generate rpcn-connector-docs --fetch-connectors
|
|
|
94
94
|
npx doc-tools generate rpcn-connector-docs --fetch-connectors
|
|
95
95
|
|
|
96
96
|
# Output:
|
|
97
|
-
#
|
|
98
|
-
#
|
|
97
|
+
# Done: Connector diff JSON written to: docs-data/connect-diff-4.53.0_to_4.54.0.json
|
|
98
|
+
# Done: Updated Antora version: 4.54.0
|
|
99
99
|
# (Generates diff, updates version, creates "what's new" data)
|
|
100
100
|
----
|
|
101
101
|
|
|
@@ -119,6 +119,12 @@ modules/components/
|
|
|
119
119
|
│ │ ├── processors/
|
|
120
120
|
│ │ ├── caches/
|
|
121
121
|
│ │ └── ...
|
|
122
|
+
│ ├── components/
|
|
123
|
+
│ │ └── cloud-only/ # Cloud-only connector drafts
|
|
124
|
+
│ │ ├── inputs/
|
|
125
|
+
│ │ │ └── a2a_message.adoc
|
|
126
|
+
│ │ ├── outputs/
|
|
127
|
+
│ │ └── processors/
|
|
122
128
|
│ ├── examples/
|
|
123
129
|
│ │ ├── inputs/
|
|
124
130
|
│ │ ├── outputs/
|
|
@@ -130,6 +136,11 @@ modules/components/
|
|
|
130
136
|
└── pages/
|
|
131
137
|
├── connect-api-reference.adoc
|
|
132
138
|
└── ...
|
|
139
|
+
|
|
140
|
+
docs-data/ # Generated data and analysis
|
|
141
|
+
├── connect-<version>.json # Full connector schema
|
|
142
|
+
├── connect-diff-X_to_Y.json # Version comparison
|
|
143
|
+
└── cloud-comparison-<version>.json # Cloud support analysis
|
|
133
144
|
----
|
|
134
145
|
|
|
135
146
|
=== Common workflows
|
|
@@ -189,12 +200,120 @@ npx doc-tools generate rpcn-connector-docs \
|
|
|
189
200
|
**Available options:**
|
|
190
201
|
|
|
191
202
|
* `--fetch-connectors` - Fetch latest data using `rpk connect list`
|
|
203
|
+
* `--connect-version <version>` - Specific Connect version to install and fetch (requires `--fetch-connectors`)
|
|
192
204
|
* `--draft-missing` - Generate full draft pages for undocumented connectors
|
|
193
205
|
* `--overrides <path>` - Apply custom descriptions/examples from JSON
|
|
194
206
|
* `--data-dir <path>` - Directory containing versioned connect JSON files
|
|
195
207
|
* `--old-data <path>` - Specific old version file for diff comparison
|
|
196
|
-
* `--csv <path>` - Connector metadata CSV (default: `internal/plugins/info.csv`)
|
|
197
208
|
* `--include-bloblang` - Include Bloblang functions/methods
|
|
209
|
+
* `--cloud-version <version>` - Specific cloud binary version to analyze (auto-detects latest if not specified)
|
|
210
|
+
* `--cgo-version <version>` - Specific CGO binary version to analyze (defaults to same as cloud-version)
|
|
211
|
+
* `--skip-cloud-detection` - Skip cloud binary analysis for faster runs
|
|
212
|
+
* `--update-whats-new` - Update whats-new.adoc with new section from diff JSON
|
|
213
|
+
|
|
214
|
+
==== Understanding version options
|
|
215
|
+
|
|
216
|
+
The automation works with three different version parameters, each controlling a different aspect of the documentation generation:
|
|
217
|
+
|
|
218
|
+
**1. `--connect-version` (OSS/rpk version)**
|
|
219
|
+
|
|
220
|
+
Controls which version of Redpanda Connect to install and fetch connector data from.
|
|
221
|
+
|
|
222
|
+
* *Purpose:* Fetches connector schemas from a specific Connect version
|
|
223
|
+
* *Requires:* `--fetch-connectors` flag
|
|
224
|
+
* *Default:* Latest available version (if not specified)
|
|
225
|
+
* *Example:* `--connect-version 4.75.1`
|
|
226
|
+
|
|
227
|
+
[,bash]
|
|
228
|
+
----
|
|
229
|
+
# Generate docs for Connect 4.75.1 specifically
|
|
230
|
+
npx doc-tools generate rpcn-connector-docs \
|
|
231
|
+
--fetch-connectors \
|
|
232
|
+
--connect-version 4.75.1
|
|
233
|
+
----
|
|
234
|
+
|
|
235
|
+
**When to use:**
|
|
236
|
+
|
|
237
|
+
* Testing documentation for a specific release before it's published
|
|
238
|
+
* Generating docs for a beta/RC version
|
|
239
|
+
* Reproducing issues with a specific version
|
|
240
|
+
|
|
241
|
+
**2. `--cloud-version` (Cloud binary version)**
|
|
242
|
+
|
|
243
|
+
Controls which Redpanda Cloud binary to download and analyze for cloud connector availability.
|
|
244
|
+
|
|
245
|
+
* *Purpose:* Analyzes which connectors are available in Redpanda Cloud
|
|
246
|
+
* *Default:* Auto-detects latest cloud release from GitHub
|
|
247
|
+
* *Example:* `--cloud-version 4.76.0`
|
|
248
|
+
|
|
249
|
+
[,bash]
|
|
250
|
+
----
|
|
251
|
+
# Analyze cloud support using specific cloud version
|
|
252
|
+
npx doc-tools generate rpcn-connector-docs \
|
|
253
|
+
--fetch-connectors \
|
|
254
|
+
--cloud-version 4.76.0
|
|
255
|
+
----
|
|
256
|
+
|
|
257
|
+
**When to use:**
|
|
258
|
+
|
|
259
|
+
* Cloud binary version differs from OSS version
|
|
260
|
+
* Testing cloud support for a specific release
|
|
261
|
+
* Comparing cloud availability across versions
|
|
262
|
+
|
|
263
|
+
**3. `--cgo-version` (CGO binary version)**
|
|
264
|
+
|
|
265
|
+
Controls which CGO-enabled binary to download and analyze for CGO-only connectors.
|
|
266
|
+
|
|
267
|
+
* *Purpose:* Identifies connectors requiring CGO builds (like `tigerbeetle_cdc`, `ffi`)
|
|
268
|
+
* *Default:* Uses same version as `--cloud-version`
|
|
269
|
+
* *Example:* `--cgo-version 4.76.0`
|
|
270
|
+
|
|
271
|
+
[,bash]
|
|
272
|
+
----
|
|
273
|
+
# Use different CGO version than cloud version
|
|
274
|
+
npx doc-tools generate rpcn-connector-docs \
|
|
275
|
+
--fetch-connectors \
|
|
276
|
+
--cloud-version 4.76.0 \
|
|
277
|
+
--cgo-version 4.75.1
|
|
278
|
+
----
|
|
279
|
+
|
|
280
|
+
**When to use:**
|
|
281
|
+
|
|
282
|
+
* CGO binary version differs from cloud version
|
|
283
|
+
* Testing CGO-only connector availability
|
|
284
|
+
|
|
285
|
+
**Version matching and compatibility:**
|
|
286
|
+
|
|
287
|
+
The three versions can be set independently, allowing you to mix and match:
|
|
288
|
+
|
|
289
|
+
[,bash]
|
|
290
|
+
----
|
|
291
|
+
# Example: Generate docs for Connect 4.75.1 but check cloud support in 4.76.0
|
|
292
|
+
npx doc-tools generate rpcn-connector-docs \
|
|
293
|
+
--fetch-connectors \
|
|
294
|
+
--connect-version 4.75.1 \
|
|
295
|
+
--cloud-version 4.76.0
|
|
296
|
+
----
|
|
297
|
+
|
|
298
|
+
This is useful when:
|
|
299
|
+
|
|
300
|
+
* Cloud releases lag behind OSS releases
|
|
301
|
+
* You want to document upcoming features while checking current cloud support
|
|
302
|
+
* Testing compatibility between different versions
|
|
303
|
+
|
|
304
|
+
**Auto-detection behavior:**
|
|
305
|
+
|
|
306
|
+
If you don't specify versions:
|
|
307
|
+
|
|
308
|
+
[,bash]
|
|
309
|
+
----
|
|
310
|
+
# Uses latest for everything
|
|
311
|
+
npx doc-tools generate rpcn-connector-docs --fetch-connectors
|
|
312
|
+
----
|
|
313
|
+
|
|
314
|
+
* `--connect-version`: Uses latest available from `rpk connect`
|
|
315
|
+
* `--cloud-version`: Auto-detects latest cloud release from GitHub
|
|
316
|
+
* `--cgo-version`: Uses same as `--cloud-version`
|
|
198
317
|
|
|
199
318
|
==== Checking connector availability
|
|
200
319
|
|
|
@@ -214,6 +333,61 @@ This catalog includes:
|
|
|
214
333
|
* Deprecated status
|
|
215
334
|
* Documentation URLs
|
|
216
335
|
|
|
336
|
+
==== Analyzing cloud binary support
|
|
337
|
+
|
|
338
|
+
The automation automatically analyzes cloud and CGO binaries to detect connector availability and generate PR-friendly summaries:
|
|
339
|
+
|
|
340
|
+
[,bash]
|
|
341
|
+
----
|
|
342
|
+
# Generate with cloud analysis (default)
|
|
343
|
+
npx doc-tools generate rpcn-connector-docs --fetch-connectors
|
|
344
|
+
|
|
345
|
+
# Skip cloud detection for faster runs during development
|
|
346
|
+
npx doc-tools generate rpcn-connector-docs \
|
|
347
|
+
--fetch-connectors \
|
|
348
|
+
--skip-cloud-detection
|
|
349
|
+
|
|
350
|
+
# Analyze specific cloud version
|
|
351
|
+
npx doc-tools generate rpcn-connector-docs \
|
|
352
|
+
--fetch-connectors \
|
|
353
|
+
--cloud-version 4.76.0
|
|
354
|
+
----
|
|
355
|
+
|
|
356
|
+
**What gets analyzed:**
|
|
357
|
+
|
|
358
|
+
* *OSS connectors* - Available in standard `rpk` binary
|
|
359
|
+
* *Cloud connectors* - Available in Redpanda Cloud binary
|
|
360
|
+
* *CGO connectors* - Available only in cgo-enabled builds
|
|
361
|
+
* *Cloud-only connectors* - In cloud binary but NOT in OSS
|
|
362
|
+
* *Self-hosted only* - In OSS but NOT available in cloud
|
|
363
|
+
|
|
364
|
+
**Cloud-only connector placement:**
|
|
365
|
+
|
|
366
|
+
When a connector is detected as cloud-only, draft documentation is automatically placed in:
|
|
367
|
+
|
|
368
|
+
[,text]
|
|
369
|
+
----
|
|
370
|
+
modules/components/partials/components/cloud-only/
|
|
371
|
+
├── inputs/
|
|
372
|
+
│ └── a2a_message.adoc
|
|
373
|
+
├── outputs/
|
|
374
|
+
│ └── cloud_specific_output.adoc
|
|
375
|
+
└── processors/
|
|
376
|
+
└── cloud_processor.adoc
|
|
377
|
+
----
|
|
378
|
+
|
|
379
|
+
**PR summary generation:**
|
|
380
|
+
|
|
381
|
+
The automation generates a comprehensive GitHub Action-parseable summary including:
|
|
382
|
+
|
|
383
|
+
* Quick overview of connector changes
|
|
384
|
+
* Action items checklist for writers (prioritized)
|
|
385
|
+
* Breaking changes flagged (removed connectors, fields, default changes)
|
|
386
|
+
* Cloud support analysis showing which connectors need cloud docs
|
|
387
|
+
* Newly drafted connectors with file paths
|
|
388
|
+
|
|
389
|
+
The summary is wrapped in `<!-- PR_SUMMARY_START -->` and `<!-- PR_SUMMARY_END -->` markers for easy extraction by GitHub Actions workflows.
|
|
390
|
+
|
|
217
391
|
== How it works
|
|
218
392
|
|
|
219
393
|
=== Architecture overview
|
|
@@ -238,18 +412,30 @@ This catalog includes:
|
|
|
238
412
|
│ └─ Compare: rpk version vs latest-connect-version │
|
|
239
413
|
│ └─ Exit early if versions match │
|
|
240
414
|
│ │
|
|
241
|
-
│ 3.
|
|
415
|
+
│ 3. Analyze cloud and CGO binaries (unless --skip) │
|
|
416
|
+
│ ├─ Download cloud binary from GitHub releases │
|
|
417
|
+
│ ├─ Download CGO binary from GitHub releases │
|
|
418
|
+
│ ├─ Inspect connector availability in each binary │
|
|
419
|
+
│ ├─ Compare OSS vs Cloud vs CGO │
|
|
420
|
+
│ ├─ Identify cloud-only and cgo-only connectors │
|
|
421
|
+
│ └─ Output: docs-data/cloud-comparison-<version>.json │
|
|
422
|
+
│ │
|
|
423
|
+
│ 4. Generate AsciiDoc partials for each connector │
|
|
242
424
|
│ ├─ Apply overrides (custom descriptions/examples) │
|
|
243
425
|
│ ├─ Resolve $ref references │
|
|
426
|
+
│ ├─ Mark cloud-only and cgo-only connectors │
|
|
244
427
|
│ ├─ Render fields using Handlebars templates │
|
|
245
|
-
│
|
|
428
|
+
│ ├─ Output regular: modules/components/partials/fields/ │
|
|
429
|
+
│ └─ Output cloud-only: partials/components/cloud-only/ │
|
|
246
430
|
│ │
|
|
247
|
-
│
|
|
431
|
+
│ 5. Generate diff report (if versions differ) │
|
|
248
432
|
│ ├─ Compare old vs new connector schemas │
|
|
249
433
|
│ ├─ Identify new/removed connectors and fields │
|
|
434
|
+
│ ├─ Flag breaking changes (removed fields, defaults) │
|
|
435
|
+
│ ├─ Generate PR-friendly summary with cloud info │
|
|
250
436
|
│ └─ Output: docs-data/connect-diff-X_to_Y.json │
|
|
251
437
|
│ │
|
|
252
|
-
│
|
|
438
|
+
│ 6. Update version in antora.yml (if versions differ) │
|
|
253
439
|
│ └─ Set: latest-connect-version attribute │
|
|
254
440
|
│ │
|
|
255
441
|
└─────────────────────┬───────────────────────────────────────┘
|
|
@@ -261,19 +447,21 @@ This catalog includes:
|
|
|
261
447
|
│ │
|
|
262
448
|
│ Extensions: │
|
|
263
449
|
│ • generate-rp-connect-info │
|
|
264
|
-
│ └─ Fetches connector catalog CSV
|
|
450
|
+
│ └─ Fetches connector catalog CSV from GitHub │
|
|
451
|
+
│ └─ Uses latest-connect-version from antora.yml │
|
|
265
452
|
│ └─ Enriches with documentation URLs │
|
|
266
453
|
│ └─ Attaches to component attributes │
|
|
267
454
|
│ │
|
|
455
|
+
│ • collect-bloblang-samples │
|
|
456
|
+
│ └─ Collects Bloblang playground examples │
|
|
457
|
+
│ └─ Attaches to component attributes │
|
|
458
|
+
│ │
|
|
268
459
|
│ • generate-rp-connect-categories │
|
|
460
|
+
│ └─ Reads CSV data from generate-rp-connect-info │
|
|
461
|
+
│ └─ Reads commercial names from frontmatter │
|
|
269
462
|
│ └─ Generates category pages by type │
|
|
270
463
|
│ └─ Sorts connectors by support level │
|
|
271
464
|
│ │
|
|
272
|
-
│ • modify-connect-tag-playbook │
|
|
273
|
-
│ └─ Manages version tracking │
|
|
274
|
-
│ └─ Detects version changes │
|
|
275
|
-
│ └─ Skips processing if version matches │
|
|
276
|
-
│ │
|
|
277
465
|
└─────────────────────────────────────────────────────────────┘
|
|
278
466
|
----
|
|
279
467
|
|
|
@@ -313,12 +501,12 @@ A list of broker addresses to connect to.
|
|
|
313
501
|
|
|
314
502
|
*Examples:*
|
|
315
503
|
|
|
316
|
-
[
|
|
317
|
-
|
|
504
|
+
[,yaml]
|
|
505
|
+
\----
|
|
318
506
|
seed_brokers:
|
|
319
507
|
- localhost:9092
|
|
320
508
|
- broker1:9092
|
|
321
|
-
|
|
509
|
+
\----
|
|
322
510
|
----
|
|
323
511
|
|
|
324
512
|
==== 2. Connector catalog
|
|
@@ -404,6 +592,8 @@ tools/redpanda-connect/
|
|
|
404
592
|
├── generate-rpcn-connector-docs.js # Main connector doc generator
|
|
405
593
|
├── parse-csv-connectors.js # CSV catalog parser
|
|
406
594
|
├── report-delta.js # Version comparison
|
|
595
|
+
├── connector-binary-analyzer.js # Cloud/CGO binary analysis
|
|
596
|
+
├── pr-summary-formatter.js # PR-friendly summary generation
|
|
407
597
|
├── helpers/
|
|
408
598
|
│ ├── renderConnectFields.js # Renders field documentation
|
|
409
599
|
│ ├── renderConnectExamples.js # Renders examples
|
|
@@ -418,9 +608,9 @@ tools/redpanda-connect/
|
|
|
418
608
|
└── bloblang-function.hbs # Bloblang function template
|
|
419
609
|
|
|
420
610
|
extensions/
|
|
421
|
-
├── generate-rp-connect-info.js # Fetches and enriches catalog
|
|
422
|
-
├──
|
|
423
|
-
└──
|
|
611
|
+
├── generate-rp-connect-info.js # Fetches CSV from GitHub and enriches catalog
|
|
612
|
+
├── collect-bloblang-samples.js # Collects Bloblang playground examples
|
|
613
|
+
└── generate-rp-connect-categories.js # Generates category pages from CSV data
|
|
424
614
|
----
|
|
425
615
|
|
|
426
616
|
=== Connector documentation generation
|
|
@@ -443,29 +633,160 @@ The `generateRpcnConnectorDocs()` function processes component schemas:
|
|
|
443
633
|
* `templateExamples` - Examples partial template
|
|
444
634
|
* `writeFullDrafts` - Generate full pages vs partials
|
|
445
635
|
|
|
446
|
-
=== Version tracking
|
|
636
|
+
=== Version tracking and management
|
|
637
|
+
|
|
638
|
+
Version updates are now managed through the CLI command `update-connect-version`:
|
|
639
|
+
|
|
640
|
+
[,bash]
|
|
641
|
+
----
|
|
642
|
+
# Update to latest version from GitHub
|
|
643
|
+
npx doc-tools automation update-connect-version
|
|
644
|
+
|
|
645
|
+
# Update to specific version
|
|
646
|
+
npx doc-tools automation update-connect-version -v 4.76.0
|
|
647
|
+
----
|
|
648
|
+
|
|
649
|
+
The command updates the `latest-connect-version` attribute in `antora.yml`:
|
|
650
|
+
|
|
651
|
+
[,yaml]
|
|
652
|
+
----
|
|
653
|
+
asciidoc:
|
|
654
|
+
attributes:
|
|
655
|
+
latest-connect-version: 4.76.0
|
|
656
|
+
----
|
|
657
|
+
|
|
658
|
+
This version is then used by the `generate-rp-connect-info` extension to fetch the correct CSV data from GitHub during the Antora build process.
|
|
659
|
+
|
|
660
|
+
=== Commercial names and display
|
|
661
|
+
|
|
662
|
+
Connectors can have human-friendly commercial names that appear in catalogs and category pages. These are specified in the AsciiDoc frontmatter:
|
|
663
|
+
|
|
664
|
+
[,asciidoc]
|
|
665
|
+
----
|
|
666
|
+
= kafka_franz
|
|
667
|
+
:type: input
|
|
668
|
+
:commercial-names: Franz-go, Apache Kafka
|
|
669
|
+
:categories: ["Services"]
|
|
670
|
+
----
|
|
671
|
+
|
|
672
|
+
The `generate-rp-connect-categories` extension reads these commercial names and uses the first one as the primary display name. If multiple names are provided (comma-separated), only the first is used for display.
|
|
673
|
+
|
|
674
|
+
*Default behavior:* If no `:commercial-names:` attribute is found, the connector key name is used (e.g., `kafka_franz`).
|
|
675
|
+
|
|
676
|
+
*Adding commercial names to new connectors:*
|
|
677
|
+
|
|
678
|
+
When generating documentation for new connectors with `--draft-missing`, writers are reminded via PR summaries to add commercial names:
|
|
447
679
|
|
|
448
|
-
|
|
680
|
+
[,adoc]
|
|
681
|
+
----
|
|
682
|
+
### ✍️ Writer Action Required
|
|
683
|
+
|
|
684
|
+
For each new connector, please add the `:commercial-names:` attribute to the frontmatter:
|
|
685
|
+
|
|
686
|
+
```asciidoc
|
|
687
|
+
= Connector Name
|
|
688
|
+
:type: input
|
|
689
|
+
:commercial-names: Commercial Name, Alternative Name
|
|
690
|
+
```
|
|
691
|
+
|
|
692
|
+
_This helps improve discoverability and ensures proper categorization._
|
|
693
|
+
----
|
|
694
|
+
|
|
695
|
+
=== Cloud binary analysis
|
|
696
|
+
|
|
697
|
+
The `connector-binary-analyzer.js` module detects connector availability across different binaries:
|
|
449
698
|
|
|
450
699
|
[,javascript]
|
|
451
700
|
----
|
|
452
|
-
//
|
|
453
|
-
const
|
|
454
|
-
|
|
455
|
-
|
|
701
|
+
// Download and inspect cloud binary
|
|
702
|
+
const cloudVersion = await getLatestCloudVersion();
|
|
703
|
+
const cloudBinaryPath = await downloadCloudBinary(cloudVersion);
|
|
704
|
+
const cloudIndex = await inspectBinary(cloudBinaryPath);
|
|
456
705
|
|
|
457
|
-
//
|
|
458
|
-
const
|
|
706
|
+
// Download and inspect CGO binary
|
|
707
|
+
const cgoBinaryPath = await downloadCgoBinary(version);
|
|
708
|
+
const cgoIndex = await inspectBinary(cgoBinaryPath);
|
|
459
709
|
|
|
460
|
-
// Compare
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
return; // Skip diff and updates
|
|
464
|
-
}
|
|
710
|
+
// Compare OSS vs Cloud
|
|
711
|
+
const cloudComparison = compareOssWithCloud(ossIndex, cloudIndex);
|
|
712
|
+
// Returns: { inCloud, notInCloud, cloudOnly }
|
|
465
713
|
|
|
466
|
-
//
|
|
467
|
-
const
|
|
468
|
-
|
|
714
|
+
// Identify CGO-only connectors
|
|
715
|
+
const cgoOnly = findCgoOnlyConnectors(ossIndex, cgoIndex);
|
|
716
|
+
----
|
|
717
|
+
|
|
718
|
+
**Key functions:**
|
|
719
|
+
|
|
720
|
+
* `getLatestCloudVersion()` - Auto-detect latest cloud release from GitHub
|
|
721
|
+
* `downloadCloudBinary()` - Download and extract cloud binary tarball
|
|
722
|
+
* `inspectBinary()` - Run binary with `list --format json-full`
|
|
723
|
+
* `compareOssWithCloud()` - Compare connector sets between OSS and cloud
|
|
724
|
+
* `findCgoOnlyConnectors()` - Identify connectors requiring CGO builds
|
|
725
|
+
|
|
726
|
+
**Cloud-only detection:**
|
|
727
|
+
|
|
728
|
+
When a connector exists in the cloud binary but NOT in the OSS binary, it's marked as cloud-only and receives special handling:
|
|
729
|
+
|
|
730
|
+
* Draft placement: `modules/components/partials/components/cloud-only/{type}s/{name}.adoc`
|
|
731
|
+
* Metadata: Flagged with ☁️ in PR summaries
|
|
732
|
+
* Priority: Listed separately in action items
|
|
733
|
+
|
|
734
|
+
**Breaking changes detection:**
|
|
735
|
+
|
|
736
|
+
The system automatically flags:
|
|
737
|
+
|
|
738
|
+
* Removed connectors
|
|
739
|
+
* Removed fields
|
|
740
|
+
* Changed default values
|
|
741
|
+
* Deprecated connectors and fields
|
|
742
|
+
|
|
743
|
+
=== PR summary generation
|
|
744
|
+
|
|
745
|
+
The `pr-summary-formatter.js` module generates GitHub Action-parseable summaries:
|
|
746
|
+
|
|
747
|
+
[,javascript]
|
|
748
|
+
----
|
|
749
|
+
const summary = formatPrSummary({
|
|
750
|
+
oldVersion,
|
|
751
|
+
newVersion,
|
|
752
|
+
cloudVersion,
|
|
753
|
+
diffData,
|
|
754
|
+
cloudComparison,
|
|
755
|
+
drafts
|
|
756
|
+
});
|
|
757
|
+
|
|
758
|
+
// Output wrapped in markers for GitHub Actions
|
|
759
|
+
console.log('<!-- PR_SUMMARY_START -->');
|
|
760
|
+
console.log(summary);
|
|
761
|
+
console.log('<!-- PR_SUMMARY_END -->');
|
|
762
|
+
----
|
|
763
|
+
|
|
764
|
+
**Summary sections:**
|
|
765
|
+
|
|
766
|
+
* *Quick Overview* - Connector changes at a glance
|
|
767
|
+
* *Breaking Changes* - Flagged removed connectors, fields, defaults
|
|
768
|
+
* *Newly Drafted* - Auto-generated drafts with file paths
|
|
769
|
+
* *Action Items* - Prioritized checklist for writers
|
|
770
|
+
* *Cloud Support Gap Analysis* - OSS connectors not in cloud
|
|
771
|
+
* *Detailed Changes* - Expandable section with full details
|
|
772
|
+
|
|
773
|
+
**GitHub Actions integration:**
|
|
774
|
+
|
|
775
|
+
[,yaml]
|
|
776
|
+
----
|
|
777
|
+
- name: Generate connector docs
|
|
778
|
+
id: generate
|
|
779
|
+
run: |
|
|
780
|
+
npx doc-tools generate rpcn-connector-docs --fetch-connectors > output.log
|
|
781
|
+
|
|
782
|
+
- name: Extract PR summary
|
|
783
|
+
run: |
|
|
784
|
+
sed -n '/<!-- PR_SUMMARY_START -->/,/<!-- PR_SUMMARY_END -->/p' output.log > summary.txt
|
|
785
|
+
|
|
786
|
+
- name: Create PR
|
|
787
|
+
uses: peter-evans/create-pull-request@v6
|
|
788
|
+
with:
|
|
789
|
+
body-path: summary.txt
|
|
469
790
|
----
|
|
470
791
|
|
|
471
792
|
=== Override system
|
|
@@ -689,6 +1010,50 @@ cat antora.yml | grep latest-connect-version
|
|
|
689
1010
|
|
|
690
1011
|
3. Ensure modify-connect-tag-playbook extension is registered
|
|
691
1012
|
|
|
1013
|
+
=== Cloud binary analysis issues
|
|
1014
|
+
|
|
1015
|
+
**Cloud download fails:**
|
|
1016
|
+
|
|
1017
|
+
If cloud binary download fails, the script continues without cloud support data:
|
|
1018
|
+
+
|
|
1019
|
+
[,text]
|
|
1020
|
+
----
|
|
1021
|
+
Warning: Cloud analysis failed: Failed to download binary
|
|
1022
|
+
Continuing without cloud support data...
|
|
1023
|
+
----
|
|
1024
|
+
+
|
|
1025
|
+
Check:
|
|
1026
|
+
|
|
1027
|
+
* Network connectivity to GitHub
|
|
1028
|
+
* GitHub API rate limits
|
|
1029
|
+
* Binary availability for the specified version
|
|
1030
|
+
|
|
1031
|
+
**Binary permission errors:**
|
|
1032
|
+
|
|
1033
|
+
If you get permission errors when running binaries:
|
|
1034
|
+
+
|
|
1035
|
+
[,bash]
|
|
1036
|
+
----
|
|
1037
|
+
chmod +x docs-data/cloud-binaries/redpanda-connect-*
|
|
1038
|
+
----
|
|
1039
|
+
|
|
1040
|
+
**Version mismatch:**
|
|
1041
|
+
|
|
1042
|
+
If OSS and cloud versions don't match:
|
|
1043
|
+
|
|
1044
|
+
* The script compares latest OSS with latest cloud by default
|
|
1045
|
+
* Use `--cloud-version` to specify a matching version
|
|
1046
|
+
* Gap analysis will show differences between versions
|
|
1047
|
+
|
|
1048
|
+
**Skip cloud detection for faster runs:**
|
|
1049
|
+
+
|
|
1050
|
+
[,bash]
|
|
1051
|
+
----
|
|
1052
|
+
npx doc-tools generate rpcn-connector-docs \
|
|
1053
|
+
--fetch-connectors \
|
|
1054
|
+
--skip-cloud-detection
|
|
1055
|
+
----
|
|
1056
|
+
|
|
692
1057
|
=== Template rendering issues
|
|
693
1058
|
|
|
694
1059
|
**Handlebars error:**
|