Skip to content

fix(ci): fix lint-codeblocks noise and false positives (#7433)#7437

Merged
jstirnaman merged 4 commits into
masterfrom
7412-ci-gh-merge-queue
Jun 30, 2026
Merged

fix(ci): fix lint-codeblocks noise and false positives (#7433)#7437
jstirnaman merged 4 commits into
masterfrom
7412-ci-gh-merge-queue

Conversation

@jstirnaman

@jstirnaman jstirnaman commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #7433. Unblocks Phase 2 of #7412 (re-adding Lint code blocks
as a required check for the merge queue).

Linter changes (scripts/)

  • js/javascript fences are now checked by the JS validator after
    first testing for known non-JS DSLs:
    • Flux blocks (|> or from(bucket:) → skipped, logged as skipped (flux)
    • TICKscript blocks (|Node( at line start, batch()/stream(), dbrp) → skipped (tickscript)
  • Bash angle-bracket placeholder normalizer. Strips <token>
    token before syntax checking; docs-convention placeholders were
    being parsed as I/O redirects.
  • Suppressed ::warning annotations for non-blocking failures.
    Bash, Python, and JS validation failures log to console only.
    Emitting ::warning in the PR diff view risked misleading authors
    into converting fenced code blocks to inline backtick code.
  • Suppressed ::warning for missing shared source files. ENOENT
    on source: frontmatter targets also logs to console only.
  • Skip reasons in CI log. Skipped blocks now show
    skipped (flux), skipped (tickscript), or skipped (out of scope).

Content fixes (content/)

Telegraf v1 plugin docs — label-only changes (wrong fence tag was
causing blocking CI errors; content is unchanged pending upstream fixes):

  • bind: BIND named.conf in json fence → text
  • ctrlx_datalayer: ctrlX Datalayer source-value format in jsontext
    (upstream: filed as docs(inputs.ctrlx_datalayer): Source examples are fenced as json but aren't JSON telegraf#19191)
  • docker: TOML config in json fence → text
  • jti_openconfig_telemetry: duplicate key in toml block → text
  • postgresql_extensible: backslash continuation in tomltext
  • win_eventlog: unclosed triple-quoted string in tomltext
  • azure_data_explorer: KQL/Kusto in json fence → text
  • clarify: proprietary format in json fence → text
  • elasticsearch: HTTP request + body in json fence → text
  • lookup, secretstore/http: ellipsis elide markers in json fence → text
  • zabbix: JSONL payloads in json fence → jsonl
  • splunkmetric: valid JSON objects in javascript fence → json

Content fixes (actual syntax errors in the upstream examples):

  • opcua_listener, dynatrace: // comments in TOML block → #
  • converter: unclosed TOML string "unix"unix"

Upstream Telegraf

These README fixes belong at the source in influxdata/telegraf; the docs-v2
changes above are interim until the next plugin-docs sync. Tracking:
influxdata/telegraf#19201.

Genuine-error fixes (draft PRs, each verified by loading in Telegraf 1.39.1):

Fence-language mismatches (issues): influxdata/telegraf#19190 through #19200.
opcua_listener node_ids outdated structure: influxdata/telegraf#19189.

InfluxDB Cloud / Cloud Serverless — JSON API request bodies that
were in js/javascript fences → json:

  • bucket-schema, create-bucket, update-bucket (Cloud)
  • update-bucket, manage-explicit-bucket-schemas (Cloud Serverless)

Test plan

  • node scripts/ci/lint-codeblocks.mjs $(find content -name "*.md") exits 0 with zero ::error / ::warning annotations
  • Verify Lint code blocks CI job passes on this PR
  • Spot-check that Flux and TICKscript blocks log skipped (flux) / skipped (tickscript) in CI output

@jstirnaman jstirnaman requested a review from a team as a code owner June 30, 2026 18:34
@jstirnaman jstirnaman requested review from sanderson and removed request for a team June 30, 2026 18:35
- Restore JS validator with explicit Flux (|>) and TICKscript
  (|Node(, batch()/stream(), dbrp) skip detection; skip reasons
  appear in CI log as 'skipped (flux)' / 'skipped (tickscript)'
- Add angle-bracket placeholder normalizer for bash: strips <token>
  before syntax-checking so docs-convention placeholders don't look
  like I/O redirects
- Remove JS from VALIDATORS entirely was too blunt; real JavaScript
  blocks now get validated, DSL blocks are categorized and skipped
- Non-blocking validation failures (bash, python, js) and ENOENT for
  missing shared source: files emit console output only - no ::warning
  GitHub annotations that could mislead authors into converting fenced
  code blocks to inline backtick code

Closes #7433
Telegraf v1 plugin docs — label fixes so json/toml blocks parse
correctly under the CI linter:
- bind: named.conf syntax in json fence → text
- ctrlx_datalayer: ctrlX Datalayer source-value format → text
  (format unverified; upstream Telegraf PRs filed — see below)
- docker: TOML config snippets mislabeled as json → text
- jti_openconfig_telemetry: duplicate key in toml block → text
- opcua_listener, dynatrace: // inline comments in toml → #
- postgresql_extensible: backslash line continuation in toml → text
- win_eventlog: unclosed triple-quoted string in toml → text
- azure_data_explorer: KQL/Kusto code in json fence → text
- clarify: proprietary signal/values format in json fence → text
- elasticsearch: HTTP request + body in json fence → text
- zabbix: JSONL-format payloads in json fence → jsonl
- converter: unclosed toml string literal "unix → "unix"
- lookup, secretstore/http: ellipsis elide markers in json fence → text
- splunkmetric: valid JSON metric objects in javascript fence → json

InfluxDB Cloud / Cloud Serverless bucket docs:
- bucket-schema, create-bucket, update-bucket,
  manage-explicit-bucket-schemas: JSON API request bodies in
  javascript/js fences → json
Rewrites the short decision record into a self-contained ExecPlan:
- Explicit Phase 2 steps for test.yml (merge_group trigger, detect-changes
  fix, lint-codeblocks condition) now that #7433 is resolved
- Behavioral acceptance criteria for both phases
- Rollout discoveries: Phase 1 first merge bypassed the queue;
  CircleCI build count unchanged (queue builds on throwaway branches)
- Branch-protection state snapshot and recovery / idempotence notes
- gh CLI one-liners to inspect protection state and verify queue usage

No decisions changed; facts and status carried forward from the
original record.
@jstirnaman jstirnaman force-pushed the 7412-ci-gh-merge-queue branch from 418c4bf to b0cc0d0 Compare June 30, 2026 18:51
@github-actions

Copy link
Copy Markdown
Contributor

Vale Style Check Results

Metric Count
Errors 1
Warnings 63

Errors (blocking)

File Line Rule Message
content/telegraf/v1/secretstore-plugins/http.md 207 Google.Exclamation Don't use exclamation points in text.
Warnings (63)
File Line Rule Message
content/telegraf/v1/input-plugins/bind.md 2 InfluxDataDocs.Spelling Did you really mean 'Nameserver'?
content/telegraf/v1/input-plugins/bind.md 10 InfluxDataDocs.Spelling Did you really mean 'freebsd'?
content/telegraf/v1/input-plugins/bind.md 10 InfluxDataDocs.Spelling Did you really mean 'linux'?
content/telegraf/v1/input-plugins/bind.md 10 InfluxDataDocs.Spelling Did you really mean 'macos'?
content/telegraf/v1/input-plugins/bind.md 10 InfluxDataDocs.Spelling Did you really mean 'solaris'?
content/telegraf/v1/input-plugins/ctrlx_datalayer.md 2 InfluxDataDocs.Spelling Did you really mean 'Rexroth'?
content/telegraf/v1/input-plugins/ctrlx_datalayer.md 10 InfluxDataDocs.Spelling Did you really mean 'freebsd'?
content/telegraf/v1/input-plugins/ctrlx_datalayer.md 10 InfluxDataDocs.Spelling Did you really mean 'linux'?
content/telegraf/v1/input-plugins/ctrlx_datalayer.md 10 InfluxDataDocs.Spelling Did you really mean 'macos'?
content/telegraf/v1/input-plugins/ctrlx_datalayer.md 10 InfluxDataDocs.Spelling Did you really mean 'solaris'?
content/telegraf/v1/input-plugins/docker.md 10 InfluxDataDocs.Spelling Did you really mean 'freebsd'?
content/telegraf/v1/input-plugins/docker.md 10 InfluxDataDocs.Spelling Did you really mean 'linux'?
content/telegraf/v1/input-plugins/docker.md 10 InfluxDataDocs.Spelling Did you really mean 'macos'?
content/telegraf/v1/input-plugins/docker.md 10 InfluxDataDocs.Spelling Did you really mean 'solaris'?
content/telegraf/v1/input-plugins/jti_openconfig_telemetry.md 10 InfluxDataDocs.Spelling Did you really mean 'freebsd'?
content/telegraf/v1/input-plugins/jti_openconfig_telemetry.md 10 InfluxDataDocs.Spelling Did you really mean 'linux'?
content/telegraf/v1/input-plugins/jti_openconfig_telemetry.md 10 InfluxDataDocs.Spelling Did you really mean 'macos'?
content/telegraf/v1/input-plugins/jti_openconfig_telemetry.md 10 InfluxDataDocs.Spelling Did you really mean 'solaris'?
content/telegraf/v1/input-plugins/opcua_listener.md 10 InfluxDataDocs.Spelling Did you really mean 'freebsd'?
content/telegraf/v1/input-plugins/opcua_listener.md 10 InfluxDataDocs.Spelling Did you really mean 'linux'?

Showing first 20 of 63 warnings.


Check failed — fix 1 error(s) before merging.

@github-actions github-actions Bot added product:telegraf Telegraf documentation product:v2-cloud InfluxDB Cloud (TSM) product:v3-distributed InfluxDB 3 Cloud Serverless, Cloud Dedicated, Clustered labels Jun 30, 2026
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://influxdata.github.io/docs-v2/pr-preview/pr-7437/

Built to branch gh-pages at 2026-06-30 20:27 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@jstirnaman jstirnaman merged commit 5d22193 into master Jun 30, 2026
22 of 24 checks passed
@jstirnaman jstirnaman deleted the 7412-ci-gh-merge-queue branch June 30, 2026 21:27
github-actions Bot added a commit that referenced this pull request Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:telegraf Telegraf documentation product:v2-cloud InfluxDB Cloud (TSM) product:v3-distributed InfluxDB 3 Cloud Serverless, Cloud Dedicated, Clustered

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix markdown lint warnings: keep examples as fenced code blocks (including one-liners)

1 participant