Skip to content

docs: port page facts into the drop, broker, benchmark, json_array, command, and http_client specs - #517

Merged
JakeSCahill merged 4 commits into
mainfrom
docs/port-page-facts
Oct 8, 2026
Merged

JakeSCahill merged 4 commits into
mainfrom
docs/port-page-facts

Conversation

@JakeSCahill

Copy link
Copy Markdown
Contributor

Why

The Redpanda Connect component pages are now generated from these specs. For a few benthos components, the hand-written pages carried facts that the specs didn't, so switching the pages to the generated text would have lost them.

What changes

Each fact below was checked against the code:

  • drop: what it does, that it acknowledges and discards each message, and when to use it.
  • broker: what the broker output is, how pattern works, and that the name refers to the brokering pattern, not a Redpanda broker.
  • benchmark: the log line format, and what changes when count_bytes is false.
  • json_array:
    • it streams an array one element at a time
    • it fails if the first token isn't [
    • it first shipped in Redpanda Connect 4.65.0
  • command: the metadata sentence said "input"; it now says "processor".
  • http_client: a better streaming example than Twitter.
  • The logger metrics description was missing a space.

Tests pass for the touched packages. Lint reports only the four existing issues in processor_workflow_test.go.

…ommand, and http_client specs

Facts that only the hand-written Redpanda Connect pages carried, each
checked against the code: what drop does and when to use it, what the
broker output is, the benchmark log line format, how json_array streams
an array and fails without a leading bracket, the release json_array
shipped in, and a better http_client streaming example. Also fix the
command processor's metadata sentence, which said input, and a missing
space in the logger metrics description.
@JakeSCahill
JakeSCahill requested a review from Jeffail October 5, 2026 14:19
@claude

claude Bot commented Oct 5, 2026

Copy link
Copy Markdown

Commits
LGTM

Review
This PR changes only component spec descriptions. I checked each claim against the code: the drop, broker, benchmark log format, command metadata and logger fixes are correct. Two problems in the json_array scanner spec:

  1. internal/impl/pure/scanner_json_array.go: the description says the input "must be a single JSON array", but the scanner also reads concatenated top-level arrays (readNextElement calls readFirstBracket again after each ]).
  2. internal/impl/pure/scanner_json_array.go: Version("4.65.0") conflicts with CHANGELOG.md, which lists the json_array scanner under 4.57.0.

…rays

The scanner reads arrays one after another, and it first shipped in 4.57.0.
@claude

claude Bot commented Oct 5, 2026

Copy link
Copy Markdown

Commits

  1. a52391b ("docs: correct the json_array scanner version and describe multiple arrays") fixes content added earlier in this same PR by 3938a6b, which introduced the json_array version and description. It works like an unsquashed fixup, so please squash it into 3938a6b before merging so each commit stands on its own.

Review
This PR only changes docs/spec text, in drop, broker, benchmark, json_array, command, http_client and the logger metrics. I checked each new claim against the code:

  • benchmark: the log format matches printStats/benchmarkLogReporter: rolling/total window, humanize.Bytes output, and no bytes figure when count_bytes is false.
  • json_array: the behaviour matches readFirstBracket/readNextElement: it requires a leading [, accepts several arrays one after another, and errors on anything else after ].
  • json_array version: 4.57.0 matches CHANGELOG.md.
  • command: the "processor" wording fix is correct.

LGTM

… its messages accurately

Spec versions are Redpanda Connect releases: the scanner first shipped in
Connect 4.65.0, which pinned benthos 4.57.0. Each element is stored as raw
JSON, not as a structured value, so say the message contains the element
JSON.
@claude

claude Bot commented Oct 7, 2026

Copy link
Copy Markdown

Commits

  1. a52391b ("docs: correct the json_array scanner version and describe multiple arrays") and 6ccfde8 ("docs: use the Connect version for the json_array scanner and describe its messages accurately") are follow-up fixes to the json_array spec text added in 3938a6b. They are not self-contained changes: 6ccfde8 undoes the version that a52391b set (4.57.0 → 4.65.0). Please squash both into 3938a6b so the history has one logical change for the json_array docs.

Review
This PR only changes docs and spec strings. I checked the new text against the code: the json_array scanner behaviour (leading [ required, back-to-back arrays allowed, each element emitted as raw JSON) and the benchmark rolling stats: / total stats: log format both match the implementation. I found no code issues.

LGTM

@claude

claude Bot commented Oct 8, 2026

Copy link
Copy Markdown

Commits

  1. a52391b ("docs: correct the json_array scanner version and describe multiple arrays") and 6ccfde8 ("docs: use the Connect version for the json_array scanner and describe its messages accurately") fix text that 3938a6b added earlier in this same PR. a52391b sets the version to 4.57.0, then 6ccfde8 changes it to 4.65.0. They are fixup commits in all but name, so please squash them into 3938a6b. That way each commit is a self-contained change and the history does not record a wrong version.

Review
Docs-only changes to component specs: drop, broker, benchmark, json_array, command, http_client and logger metrics. I checked the new text against the code and it matches. The benchmark rolling stats/total stats line format and the count_bytes behaviour are correct. The json_array scanner does reject input without a leading [, does accept several arrays one after another, and does emit raw JSON elements. The command processor metadata wording fix is correct too.

LGTM

@JakeSCahill
JakeSCahill merged commit 6262c54 into main Oct 8, 2026
4 checks passed
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.

2 participants