Skip to content

chore(codecs): replace native encoding fixture patch files with cfg-gated code#24971

Merged
thomasqueirozb merged 17 commits into
masterfrom
refactor/native-encoding-fixtures-cfg
Apr 17, 2026
Merged

chore(codecs): replace native encoding fixture patch files with cfg-gated code#24971
thomasqueirozb merged 17 commits into
masterfrom
refactor/native-encoding-fixtures-cfg

Conversation

@thomasqueirozb
Copy link
Copy Markdown
Member

@thomasqueirozb thomasqueirozb commented Mar 20, 2026

Summary

Replaces the loose patch files (vector_generate_fixtures.patch, vrl_generate_fixtures.patch) used to regenerate native encoding test fixtures with proper generate-fixtures feature flags in both this repo and the VRL repo, plus a standalone binary that writes fixtures directly to their committed location.

Key changes:

  • generate-fixtures feature in vector-core activates fixture-stable Arbitrary impls (NaN-safe f64, non-empty names, no timestamps) and pulls in vrl/generate-fixtures automatically
  • Arbitrary impls moved from test/common.rs to event/arbitrary_impl.rs, compiled under any(test, feature = "generate-fixtures")
  • Sub-generators derived from parent via u64::arbitrary(g) instead of Gen::new() (which called from_entropy()) to ensure full determinism
  • AgentDDSketch::set_sum_avg method gated on the feature instead of making fields pub
  • Fixture generation binary (cargo run -p vector-core --features generate-fixtures --bin generate-fixtures) writes directly to lib/codecs/tests/data/native_encoding/

Vector configuration

NA

How did you test this PR?

Ran the binary twice and confirmed identical checksums. Ran cargo test -p vector-core to confirm existing tests pass.

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

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.

References

@github-actions github-actions Bot added the domain: core Anything related to core crates i.e. vector-core, core-common, etc label Mar 20, 2026
@thomasqueirozb thomasqueirozb added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Mar 20, 2026
@thomasqueirozb thomasqueirozb changed the title chore: replace native encoding fixture patch files with cfg-gated generation binary chore(codecs): replace native encoding fixture patch files with cfg-gated code Mar 20, 2026
@thomasqueirozb thomasqueirozb marked this pull request as ready for review March 20, 2026 19:16
@thomasqueirozb thomasqueirozb requested a review from a team as a code owner March 20, 2026 19:16
@pront
Copy link
Copy Markdown
Member

pront commented Mar 20, 2026

@codex review

Copy link
Copy Markdown

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

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: 8eaf3cc3b5

ℹ️ 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 Cargo.toml Outdated
@thomasqueirozb
Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

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

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@thomasqueirozb thomasqueirozb requested a review from pront April 15, 2026 17:48
Copy link
Copy Markdown
Member

@pront pront left a comment

Choose a reason for hiding this comment

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

Approved! Those patch files were embarrassing to say the least. Thanks for replacing them with a much cleaner feature-gated approach.

Reminder to revert the VRL dependency change.

@thomasqueirozb thomasqueirozb added this pull request to the merge queue Apr 15, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 15, 2026
@thomasqueirozb thomasqueirozb added this pull request to the merge queue Apr 15, 2026
@thomasqueirozb thomasqueirozb removed this pull request from the merge queue due to a manual request Apr 15, 2026
@thomasqueirozb thomasqueirozb added this pull request to the merge queue Apr 15, 2026
@thomasqueirozb thomasqueirozb removed this pull request from the merge queue due to a manual request Apr 15, 2026
@thomasqueirozb thomasqueirozb added this pull request to the merge queue Apr 15, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 15, 2026
@thomasqueirozb thomasqueirozb added this pull request to the merge queue Apr 16, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 16, 2026
@thomasqueirozb thomasqueirozb added this pull request to the merge queue Apr 17, 2026
@thomasqueirozb thomasqueirozb removed this pull request from the merge queue due to a manual request Apr 17, 2026
@thomasqueirozb thomasqueirozb added this pull request to the merge queue Apr 17, 2026
Merged via the queue into master with commit 35351b9 Apr 17, 2026
60 checks passed
@thomasqueirozb thomasqueirozb deleted the refactor/native-encoding-fixtures-cfg branch April 17, 2026 21:55
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 17, 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 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