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(metricpass): Remove python logic compatibility #13791

Merged
merged 4 commits into from
Aug 28, 2023

Conversation

powersj
Copy link
Contributor

@powersj powersj commented Aug 18, 2023

fixes: #13790

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Aug 18, 2023
@knollet
Copy link
Contributor

knollet commented Aug 18, 2023

this is the old affected version.

me@host:~/filter-bug$ telegraf -config filter-bug.conf -test
[...]
> bugreport,host=host,this=shouldn't\ !\ be\ modified and="is modified" 1692367811000000000
> bugreport,host=host,this=should\ not\ pass\ unmodified but="does pass unmodified" 1692367811000000000

this is the fix-artefact:

me@host:~/filter-bug$ bugfix/telegraf-1.28.0/usr/bin/telegraf -config filter-bug.conf -test
[...]
> bugreport,host=host,this=shouldn't\ !\ be\ modified and="is not modified" 1692367801000000000
> bugreport,host=host,this=should\ not\ pass\ unmodified but="is modified" 1692367801000000000

this is the old affected version.

me@host:~/filter-bug$ telegraf -config filter-bug2.conf -test
2023-08-18T14:14:46Z I! Loading config: filter-bug2.conf
2023-08-18T14:14:46Z E! error loading config file filter-bug2.conf: error parsing regex, ERROR: <input>:1:6: Syntax error: no viable alternative at input '.&&'
 | tags.&& == 'the name of this tag is &&'
 | .....^
ERROR: <input>:1:9: Syntax error: extraneous input '==' expecting {'[', '{', '(', '.', '-', '!', 'true', 'false', 'null', NUM_FLOAT, NUM_INT, NUM_UINT, STRING, BYTES, IDENTIFIER}
 | tags.&& == 'the name of this tag is &&'
 | ........^

this is the fix-artefact:

me@host:~/filter-bug$ bugfix/telegraf-1.28.0/usr/bin/telegraf -config filter-bug2.conf -test
[...]
> bugreport,&&=the\ name\ of\ this\ tag\ is\ &&,and=now\ for\ something\ completely\ different,host=host the="larch" 1692368092000000000

Looks good to me

@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Aug 25, 2023
@powersj powersj marked this pull request as ready for review August 25, 2023 13:09
@powersj powersj changed the title fix(metricpass): Remove python logic compatability fix(metricpass): Remove python logic compatibility Aug 25, 2023
Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

This is a breaking change and should be declared as such in the Changelog! Please also note that this was an explicit request by Dave back when I added this.

This being said, I'm fine with removing this as we can get rid of another regex pitfall and will approve when the breaking change is documented in the Changelog.

@powersj
Copy link
Contributor Author

powersj commented Aug 28, 2023

PR updated with change log entry!

This is a breaking change and should be declared as such in the Changelog! Please also note that this was an explicit request by Dave back when I added this.

Ah ok thanks for the history

Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this @powersj!

@telegraf-tiger
Copy link
Contributor

@srebhan srebhan merged commit 8dbc177 into influxdata:master Aug 28, 2023
23 checks passed
@github-actions github-actions bot added this to the v1.28.0 milestone Aug 28, 2023
knollet added a commit to knollet/telegraf that referenced this pull request Dec 11, 2023
knollet added a commit to knollet/telegraf that referenced this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

metricpass: python compatibility regex alters real data, breaks filtering
3 participants