Skip to content

refactor(value): Preserve known UTF-8 as strings - #26608

Merged
thomasqueirozb merged 4 commits into
masterfrom
bruceg/value-string-conversion-1
Oct 9, 2026
Merged

thomasqueirozb merged 4 commits into
masterfrom
bruceg/value-string-conversion-1

Conversation

@bruceg

@bruceg bruceg commented Oct 8, 2026

Copy link
Copy Markdown
Member

Summary

Keeps statically known UTF-8 values in Value::String. Updates source metadata, formatted values, and affected test expectations.

References

Vector configuration

How did you test this PR?

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

Contributor Guidelines

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Before pushing, follow our pre-push guidance.
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.

@bruceg
bruceg requested a review from a team as a code owner October 8, 2026 23:02
@bruceg bruceg added type: tech debt A code change that does not add user value. domain: core Anything related to core crates i.e. vector-core, core-common, etc no-changelog Changes in this PR do not need user-facing explanations in the release changelog labels Oct 8, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 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-09T21:27:38.232540Z 613cdd2 New commits
ℹ️ 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.

@github-actions github-actions Bot added domain: sources Anything related to the Vector's sources domain: sinks Anything related to the Vector's sinks labels Oct 8, 2026
@bruceg
bruceg requested a review from gwenaskell October 8, 2026 23:02

@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

Fluent string conversion adds literal quotes and escapes to log contents. This changes payload data rather than only its internal representation.

Open Bits AI session

🤖 Bits Code Review · Commit 626c987 · @DataDog review to ask questions

Comment thread src/sources/fluent/message.rs Outdated

@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: 626c987b44

ℹ️ 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/sources/fluent/message.rs Outdated
Comment thread src/conditions/datadog_search.rs Outdated
Comment thread src/sources/fluent/message.rs Outdated
Comment thread src/sources/fluent/message.rs
Comment thread src/sources/aws_kinesis_firehose/handlers.rs
Keeps statically known UTF-8 values in Value::String. Updates source metadata, formatted values, and affected test expectations.
@bruceg
bruceg force-pushed the bruceg/value-string-conversion-1 branch from 626c987 to 0a6b440 Compare October 8, 2026 23:46

@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: 0a6b440d90

ℹ️ 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 lib/vector-core/src/config/mod.rs

@gwenaskell gwenaskell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice! just one suggestion below

Comment thread src/sources/fluent/message.rs Outdated
Comment thread src/sources/windows_event_log/integration_tests.rs
Comment thread src/sinks/datadog/logs/sink.rs Outdated
@bruceg
bruceg requested a review from thomasqueirozb October 9, 2026 21:24
@bruceg
bruceg added this pull request to the merge queue Oct 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 9, 2026
@thomasqueirozb
thomasqueirozb added this pull request to the merge queue Oct 9, 2026
bruceg added a commit that referenced this pull request Oct 9, 2026
When truncating the `message` field of a log event, the `datadog_logs` converts
it into a string, chops part of it off, adds a truncation marker string, but
then stuffs it back into the event as a `Bytes` value. Since we know it is valid
UTF-8 by construction, we can use the `String` type instead.

This was previously submitted as part of #26608. While it looks like a bug fix,
the extra boundary check is not actually reachable in the current caller and so
is purely defensive against future (mis)uses.
Merged via the queue into master with commit 88da8cb Oct 9, 2026
132 checks passed
@thomasqueirozb
thomasqueirozb deleted the bruceg/value-string-conversion-1 branch October 9, 2026 22:50
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

domain: core Anything related to core crates i.e. vector-core, core-common, etc domain: sinks Anything related to the Vector's sinks domain: sources Anything related to the Vector's sources no-changelog Changes in this PR do not need user-facing explanations in the release changelog type: tech debt A code change that does not add user value.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants