fix(ci): fix lint-codeblocks noise and false positives (#7433)#7437
Merged
Conversation
- 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.
418c4bf to
b0cc0d0
Compare
Contributor
Vale Style Check Results
Errors (blocking)
Warnings (63)
Showing first 20 of 63 warnings. ❌ Check failed — fix 1 error(s) before merging. |
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #7433. Unblocks Phase 2 of #7412 (re-adding
Lint code blocksas a required check for the merge queue).
Linter changes (
scripts/)js/javascriptfences are now checked by the JS validator afterfirst testing for known non-JS DSLs:
|>orfrom(bucket:) → skipped, logged asskipped (flux)|Node(at line start,batch()/stream(),dbrp) →skipped (tickscript)<token>→tokenbefore syntax checking; docs-convention placeholders werebeing parsed as I/O redirects.
::warningannotations for non-blocking failures.Bash, Python, and JS validation failures log to console only.
Emitting
::warningin the PR diff view risked misleading authorsinto converting fenced code blocks to inline backtick code.
::warningfor missing shared source files. ENOENTon
source:frontmatter targets also logs to console only.skipped (flux),skipped (tickscript), orskipped (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 injsonfence →textctrlx_datalayer: ctrlX Datalayer source-value format injson→text(upstream: filed as docs(inputs.ctrlx_datalayer): Source examples are fenced as json but aren't JSON telegraf#19191)
docker: TOML config injsonfence →textjti_openconfig_telemetry: duplicate key intomlblock →textpostgresql_extensible: backslash continuation intoml→textwin_eventlog: unclosed triple-quoted string intoml→textazure_data_explorer: KQL/Kusto injsonfence →textclarify: proprietary format injsonfence →textelasticsearch: HTTP request + body injsonfence →textlookup,secretstore/http: ellipsis elide markers injsonfence →textzabbix: JSONL payloads injsonfence →jsonlsplunkmetric: valid JSON objects injavascriptfence →jsonContent 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-v2changes 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):
converter— docs(processors.converter): Fix unterminated string in timestamp example telegraf#19202opcua_listener(TOML comments) — docs(inputs.opcua_listener): Use TOML comments in group example telegraf#19203dynatrace— docs(outputs.dynatrace): Use TOML comment in api_token example telegraf#19204postgresql_extensible— docs(inputs.postgresql_extensible): Fix invalid line-continued queries telegraf#19205jti_openconfig_telemetry(sample.conf+make docs) — fix(inputs.jti_openconfig_telemetry): Remove duplicate sensors key telegraf#19206Fence-language mismatches (issues): influxdata/telegraf#19190 through #19200.
opcua_listenernode_idsoutdated structure: influxdata/telegraf#19189.InfluxDB Cloud / Cloud Serverless — JSON API request bodies that
were in
js/javascriptfences →json:Test plan
node scripts/ci/lint-codeblocks.mjs $(find content -name "*.md")exits 0 with zero::error/::warningannotationsLint code blocksCI job passes on this PRskipped (flux)/skipped (tickscript)in CI output