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(transform): Update Default KV Store TTL offset to 0 #151

Merged
merged 1 commit into from
Mar 23, 2024

Conversation

shellcromancer
Copy link
Contributor

Description

Fixes a bug in the initializer for the enrich_kv_store_set transform. Documentation states that this is an optional parameter, but the initializing function will return an error if it's not set.

Error received:

transform: enrich_kv_store_set: time: invalid duration ""

Motivation and Context

This resolved a bug where the application was inconsistent with the documentation.

How Has This Been Tested?

Validated that the config from the documentation can be loaded by the application, previously this errored during load.

sub.transform.enrich.kv_store.set(
  // The value of `domain` is put into the KV store as the value of `ip`.
  settings={kv_store: sub.kv_store.memory(settings={}), object: {source_key: 'ip', target_key: 'domain'}}
)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@shellcromancer shellcromancer requested a review from a team as a code owner March 22, 2024 22:00
@jshlbrd jshlbrd self-assigned this Mar 22, 2024
@shellcromancer shellcromancer changed the title fix(enrich_kv_store_set): default to 0 duration fix(transform): Update Default KV Store TTL to 0 Mar 22, 2024
Documentation states that this is an optional parameter, but the
initializing function will return an error if it's not set.

> transform: enrich_kv_store_set: time: invalid duration ""
@shellcromancer shellcromancer force-pushed the shellcromancer/fix/kv-set-empty-ttl-duration branch from 3e0398c to b78f40b Compare March 22, 2024 23:12
@shellcromancer shellcromancer changed the title fix(transform): Update Default KV Store TTL to 0 fix(transform): Update Default KV Store TTL offset to 0 Mar 22, 2024
Copy link
Contributor

@jshlbrd jshlbrd left a comment

Choose a reason for hiding this comment

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

Good find, there may be other inconsistencies like this between the docs and code. 👍

@jshlbrd jshlbrd merged commit 8a1d31c into main Mar 23, 2024
5 checks passed
@jshlbrd jshlbrd deleted the shellcromancer/fix/kv-set-empty-ttl-duration branch March 23, 2024 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants