Skip to content

feat(config): warn about ignored configuration fields - #26849

Merged
thomasqueirozb merged 10 commits into
masterfrom
pront-warn-ignored-config-fields
Oct 28, 2026
Merged

thomasqueirozb merged 10 commits into
masterfrom
pront-warn-ignored-config-fields

Conversation

@pront

@pront pront commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Misspelled settings such as request.retry_atempts, and fields unused by the selected authentication strategy, can currently load successfully without taking effect. Add configuration-loading warnings and a deprecation notice so users can correct these settings before a future release rejects them.

Changes

  • Check for ignored fields in the shared loader, covering flattened structs, enum variants, aliases, and component directories. Arbitrary-key maps remain supported.
  • Use the generated schema for diagnostics; Serde still determines which configurations load. Schema mismatches conservatively skip the check. Mark fields consumed and discarded by the custom HTTP authentication deserializer explicitly. Documented settings that are inactive in a selected mode are outside this deprecation.
  • Carry field-path warnings through startup, HTTP-provider reloads, and strict validation without logging values. Log the complete warning list together so repeated loads respect the existing rate limit. Add migration guidance.

References

Follows #26840, now merged into master.

Related: #23188, #26611.

Vector configuration

For example, these HTTP authentication and sink request settings now produce warnings:

# In an HTTP server source:
auth:
  strategy: bearer
  token: example-token
  username: unused

# In an HTTP sink:
request:
  retry_atempts: 3

Remove the unused username and correct retry_atempts to retry_attempts.

How did you test this PR?

  • All 110 selected configuration-loading, HTTP-provider, authentication, and CLI tests passed. The five new tests focus on warning output, valid and invalid configurations, provider reloads, and strict CLI validation; existing loading tests cover interpolation and merging.
  • Manually checked a minimal HTTP build with a provider polling every second and a 60-second log limit: seven fetches emitted each initial warning once. Normal validation succeeded; --deny-warnings returned configuration error 78.
  • Scoped Clippy, formatting, Markdown, and deprecation checks passed. Rendered the website and verified the migration link, anchor, and clarified deprecation scope.
  • Full documentation regeneration was stopped at the local disk-space limit; the edited pages and migration link were verified through a direct website build.

Does this PR include user facing changes?

  • Yes. Announced through the deprecation notice; no separate changelog fragment is needed.
  • No.

@github-actions github-actions Bot added the docs review on hold The documentation team reviews PRs only after a PR is approved by the COSE team. label Oct 26, 2026
@pront pront added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Oct 26, 2026
@pront
pront marked this pull request as ready for review October 26, 2026 21:25
@pront
pront requested review from a team as code owners October 26, 2026 21:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T16:35:42.228348Z 7f8d852 Manual request
🔒 Security Review ✅ Completed 2026-10-28T16:35:50.311201Z 7f8d852 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 453cd543dd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/config/loading/config_builder.rs Outdated
Comment thread src/config/loading/config_builder.rs

@datadoghq-integration datadoghq-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

Feature-limited binaries can lose all ignored-field diagnostics, and validation with --deny-warnings does not reject the new warnings.

Open Bits AI session

🤖 Bits Code Review · Commit 453cd54

Comment thread src/config/loading/ignored_fields.rs Outdated
Comment thread src/config/loading/config_builder.rs Outdated
@pront
pront force-pushed the pront-warn-ignored-config-fields branch 2 times, most recently from f15d7b0 to 5f26cb0 Compare October 27, 2026 18:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c5aed8ce8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/config/loading/mod.rs
Comment thread src/config/builder.rs Outdated
Comment thread src/config/loading/ignored_fields.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ac894a6153

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/config/loading/mod.rs Outdated
Comment thread src/config/loading/ignored_fields.rs
Comment thread src/config/loading/config_builder.rs
Comment thread deprecation.d/ignored-configuration-fields.md Outdated
@pront
pront force-pushed the pront-warn-ignored-config-fields branch from 54ff340 to 7f8d852 Compare October 28, 2026 16:30
@pront

pront commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 7f8d852dc9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 7f8d852dc9

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@pront
pront enabled auto-merge October 28, 2026 16:46
@pront
pront added this pull request to the merge queue Oct 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 28, 2026
@pront
pront enabled auto-merge October 28, 2026 17:56
@thomasqueirozb
thomasqueirozb added this pull request to the merge queue Oct 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 28, 2026
@thomasqueirozb
thomasqueirozb added this pull request to the merge queue Oct 28, 2026
Merged via the queue into master with commit 577e025 Oct 28, 2026
64 checks passed
@thomasqueirozb
thomasqueirozb deleted the pront-warn-ignored-config-fields branch October 28, 2026 19:51
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

docs review on hold The documentation team reviews PRs only after a PR is approved by the COSE team. no-changelog Changes in this PR do not need user-facing explanations in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants