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

validate if timkey is less than equal 0 #2615

Merged
merged 1 commit into from
Sep 11, 2019

Conversation

ganmacs
Copy link
Member

@ganmacs ganmacs commented Sep 11, 2019

Signed-off-by: Yuta Iwama ganmacs@gmail.com

Which issue(s) this PR fixes:
Fixes #2607

What this PR does / why we need it:

I made a change to raise an error when a user specifies timekey less than equal 0.
when timekey is 0, fluentd will raise ZeroDivisionError at here.

Docs Changes:

no need

Release Note:

same as the title

Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
@repeatedly
Copy link
Member

Looks good.

The potential problem is fluentd uses non-strict conversion for parameters like

INTEGER_TYPE = Proc.new { |val, opts| val.to_i }

We should improve this point to use Integer() or others.
This change has compatibility probolem so it will be implemented in v2 or via configuration.

Copy link
Member

@repeatedly repeatedly left a comment

Choose a reason for hiding this comment

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

After test passed, please merge!

@ganmacs ganmacs merged commit 77e4fa3 into fluent:master Sep 11, 2019
@ganmacs ganmacs deleted the validate-if-timekey-is-lte-0 branch September 11, 2019 08:34
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.

error_class=ZeroDivisionError error="divided by 0"
2 participants