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 retries in generator #786

Merged
merged 1 commit into from
Aug 4, 2022
Merged

Fix retries in generator #786

merged 1 commit into from
Aug 4, 2022

Conversation

SuperQ
Copy link
Member

@SuperQ SuperQ commented Aug 3, 2022

Fix parsing of 0 in retries in the generator config by making the
struct value a pointer0.

Fixes: #785

Signed-off-by: SuperQ [email protected]

@SuperQ SuperQ force-pushed the superq/fix_0_retries branch from 197ecf5 to a6f4601 Compare August 3, 2022 17:24
@SuperQ SuperQ requested review from RichiH and roidelapluie August 3, 2022 17:27
Fix parsing of `0` in retries in the generator config by making the
struct value a pointer[0].

Fixes: #785

[0]: https://www.sohamkamani.com/golang/omitempty/#the-difference-between-0--and-nil

Signed-off-by: SuperQ <[email protected]>
@SuperQ SuperQ force-pushed the superq/fix_0_retries branch from a6f4601 to 93b866c Compare August 4, 2022 02:38
@roidelapluie
Copy link
Member

this actually seems like a bug in the yaml lib

@SuperQ
Copy link
Member Author

SuperQ commented Aug 4, 2022

I agree, it's a very strange behavior of the library.

Sadly, we're stuck with yaml.v2 due the new library not having a strict unmarshal.

We might consider moving to a different yaml library.

@SuperQ SuperQ merged commit 74f0ae5 into main Aug 4, 2022
@SuperQ SuperQ deleted the superq/fix_0_retries branch August 4, 2022 11:47
@roidelapluie
Copy link
Member

The new library has strict unmarshal.

SuperQ added a commit that referenced this pull request Nov 21, 2022
* [CHANGE] Update to exporter-toolkit v0.8.1 (#810)
* [FEATURE] Support chained lookups in the generator (#757)
* [ENHANCEMENT] Add per-SNMP packet statistics. (#656)
* [ENHANCEMENT] Add support for aes192c and aes256c privacy protocol (#657)
* [ENHANCEMENT] Support responding from different source address (#702)
* [BUGFIX] Fixes dropped context passing (#634)
* [BUGFIX] Add version flag (#717)
* [BUGFIX] Fix retries in generator (#786)

Signed-off-by: SuperQ <[email protected]>
@SuperQ SuperQ mentioned this pull request Nov 21, 2022
SuperQ added a commit that referenced this pull request Nov 21, 2022
* [CHANGE] Update to exporter-toolkit v0.8.1 (#810)
* [FEATURE] Support chained lookups in the generator (#757)
* [ENHANCEMENT] Add per-SNMP packet statistics. (#656)
* [ENHANCEMENT] Add support for aes192c and aes256c privacy protocol (#657)
* [ENHANCEMENT] Support responding from different source address (#702)
* [BUGFIX] Fixes dropped context passing (#634)
* [BUGFIX] Add version flag (#717)
* [BUGFIX] Fix retries in generator (#786)

Signed-off-by: SuperQ <[email protected]>
SuperQ added a commit that referenced this pull request Nov 22, 2022
* [CHANGE] Update to exporter-toolkit v0.8.1 (#810)
* [FEATURE] Support chained lookups in the generator (#757)
* [ENHANCEMENT] Add per-SNMP packet statistics. (#656)
* [ENHANCEMENT] Add support for aes192c and aes256c privacy protocol (#657)
* [ENHANCEMENT] Support responding from different source address (#702)
* [BUGFIX] Fixes dropped context passing (#634)
* [BUGFIX] Add version flag (#717)
* [BUGFIX] Fix retries in generator (#786)

Signed-off-by: SuperQ <[email protected]>

Signed-off-by: SuperQ <[email protected]>
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.

retries 0 is not respected
2 participants