influxdata / influxdb-client-java

InfluxDB 2 JVM Based Clients
https://influxdata.github.io/influxdb-client-java/
MIT License
434 stars 129 forks source link

add escaping for backslashes, fixes #718 #720

Open oliverrahner opened 4 months ago

oliverrahner commented 4 months ago

Closes #718

Proposed Changes

Backslashes should also be escaped. This is generally optional in InfluxDB, but in special cases such as the end of a tag value, it might become crucial

Checklist

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.39%. Comparing base (dc1d442) to head (8f23758).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #720 +/- ## ============================================ + Coverage 88.37% 88.39% +0.01% + Complexity 786 784 -2 ============================================ Files 174 174 Lines 7091 7093 +2 Branches 391 391 ============================================ + Hits 6267 6270 +3 + Misses 698 697 -1 Partials 126 126 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

oliverrahner commented 4 months ago

Good thing you asked about the integration tests... turns out my fix doesn't work :-/ I'll work on it.

oliverrahner commented 4 months ago

So, this probably still is true: https://github.com/influxdata/docs.influxdata.com-ARCHIVE/issues/2676 I've opened a new docs issue here: https://github.com/influxdata/docs-v2/issues/5481

Not fully aware of this library's policy, should it try to inform the user about the actual cause of the issue, such as a tag value ending in a backslash? Or should this be left to the Influx daemon (which doesn't do a good job explaining the issue in this case)?

Independent from this question, the actual change introduced with this PR is probably still a good idea.