Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(reduce transform): enable quoting for invalid fields #21989

Merged
merged 4 commits into from
Dec 9, 2024

Conversation

pront
Copy link
Member

@pront pront commented Dec 9, 2024

Summary

#21323 added unquoted iterators but it also made the other iterators return unquoted fields.

Change Type

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

Is this a breaking change?

  • Yes
  • No

How did you test this PR?

transforms:
  transform0:
    type: reduce
    inputs:
      - my_input
    group_by:
      - id
    expire_after_ms: 2000
    max_events: 500
    merge_strategies:
      foo: array
tests:
  - name: map_transform0.space
    inputs:
      - type: vrl
        insert_at: transform0
        source: |
          . = {
            "a b": 1
          }
      - type: vrl
        insert_at: transform0
        source: |
          . = {
            "a b": 1
          }
    outputs:
      - extract_from: transform0
        conditions:
          - type: vrl
            source: |
              assert_eq!(., {"a b": 2})

Also added a unit test to cover this.

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.

Checklist

  • Please read our Vector contributor resources.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run dd-rust-license-tool write to regenerate the license inventory and commit the changes (if any). More details here.

References

@pront pront requested a review from a team as a code owner December 9, 2024 15:52
@github-actions github-actions bot added the domain: core Anything related to core crates i.e. vector-core, core-common, etc label Dec 9, 2024
@github-actions github-actions bot added the domain: transforms Anything related to Vector's transform components label Dec 9, 2024
@pront pront requested review from jszwedko and bruceg December 9, 2024 16:14
@datadog-vectordotdev
Copy link

Datadog Report

Branch report: pront/fix-reduce-wrong-config
Commit report: dab517c
Test service: vector

✅ 0 Failed, 7 Passed, 0 Skipped, 25.45s Total Time

@pront pront added this pull request to the merge queue Dec 9, 2024
Merged via the queue into master with commit 46521dc Dec 9, 2024
56 checks passed
@pront pront deleted the pront/fix-reduce-wrong-config branch December 9, 2024 19:28
pront added a commit that referenced this pull request Dec 9, 2024
* fix(reduce transform): enable quoting for invalid fields

* changelog

* fix

* cargo fmt
pront added a commit that referenced this pull request Dec 10, 2024
* bump Vector minor and VRL version

* fix(reduce transform): enable quoting for invalid fields (#21989)

* fix(reduce transform): enable quoting for invalid fields

* changelog

* fix

* cargo fmt

* fix(internal_metrics source): Emit `build_info` gauge on an interval (#21991)

* fix(internal_metrics source): Emit build_info on an interval

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

* Add changelog entry

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

* Fix imports

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

* fix: add import

---------

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
Co-authored-by: Pavlos Rontidis <pavlos.rontidis@gmail.com>

* more bumps and md

* cargo vdev build release-cue

* add 0.43.1.cue

* add description

* change date

---------

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
Co-authored-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: core Anything related to core crates i.e. vector-core, core-common, etc domain: transforms Anything related to Vector's transform components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce transform cannot handle keys with spaces
2 participants