GithubHelp home page GithubHelp logo

Comments (12)

CheyiLin avatar CheyiLin commented on September 27, 2024

Additional info:

If I don't tag v.device_name and v.mount_point 2 string keys, the @influxdb.write_points() call will work, but the data written to influxdb are wrong:

> SELECT "v.device_name", "v.mount_point" FROM "mydb"."system.filesystem"

time    v.device_name             v.mount_point
----    ----                      ----
....    D:",v.mount_point="D:\    D:

from fluent-plugin-influxdb.

repeatedly avatar repeatedly commented on September 27, 2024

I guess that it is caused by influxdb-ruby, but I think that asking here is a good start.

Yes. fluent-plugin-influxdb doesn't touch event content.

from fluent-plugin-influxdb.

CheyiLin avatar CheyiLin commented on September 27, 2024

The bug has been fixed in https://rubygems.org/gems/influxdb/versions/0.4.2

It would be great that we upgrade the influxdb-ruby to >= 0.4, but will lose Ruby < 2.2 compatibility.

Any ideas?

from fluent-plugin-influxdb.

dmke avatar dmke commented on September 27, 2024

If Ruby 1.9+ compatibility is absolute necessary, I could be persuaded to backport this bugfix into another 0.3.x release. However, Ruby 2.1 is EOL since 2017/04, so I need some strong arguments (or a PR against the influxdb-ruby/stable-03 tree πŸ˜‰)

from fluent-plugin-influxdb.

repeatedly avatar repeatedly commented on September 27, 2024

I think Ruby 1.9/2.0 support is no longer needed.
But ruby 2.1 is still widely used including td-agent 2 so backport above fix to 0.3 release is very helpful for me.
If 0.4 release is compatible with 0.3, we can relax version constraint of this plugin.
If not, we need changes to support 0.3 and 0.4 together.

from fluent-plugin-influxdb.

dmke avatar dmke commented on September 27, 2024

But ruby 2.1 is still widely used

Is it? My impression is that the 2.0β†’2.1β†’2.2β†’2.3 migration process is really painless and people didn't stay long on the previous version. Are there distribution apart from Debian Jessie, which still ship Ruby 2.1?

If 0.4 release is compatible with 0.3,

Mostly. 0.4 removed Ruby compat for MRI < 2.2, which allowed some major code cleanups. Since then only a few new features have landed in the gem: I consider it feature complete, but sometimes people find new use cases :-).

The API hasn't changed between 0.3 and 0.4 in a backward compatible manner (if it has, it is a bug), so depending on ~> 0.3 should suffice. v0.4 has set required_ruby_version in its .gemspec. I don't know whether fluent-gem install ... knows how to interpret that setting, though...

I think, cobbling together a bugfix release for 0.3 should be too hard (tomorrow, anyway).

from fluent-plugin-influxdb.

repeatedly avatar repeatedly commented on September 27, 2024

The API hasn't changed between 0.3 and 0.4 in a backward compatible manner (if it has, it is a bug),

Okay. I will check it.

I don't know whether fluent-gem install ... knows how to interpret that setting, though...

To avoid this problem, we need to install v0.3 seriese first like this: https://github.com/fangli/fluent-plugin-influxdb#installation

from fluent-plugin-influxdb.

dmke avatar dmke commented on September 27, 2024

Sorry, it was late for me yesterday:

The API hasn't changed between 0.3 and 0.4 in a backward compatible manner

should read

The API hasn't changed between 0.3 and 0.4 in a backward incompatible manner

from fluent-plugin-influxdb.

dmke avatar dmke commented on September 27, 2024

I have just released v0.3.17 of the InfluxDB gem, backporting the bugfixes applied to the v0.4 tree.


we need to install v0.3 seriese first like this: [...]

I believe, I've miscommunicated my intent: When I said "so depending on ~> 0.3 should suffice", I was referring to your .gemspec. If fluent-gem install fluent-plugin-influxdb -v 1.0.0.rc2 does the right thing, it will pick up InfluxDB v0.3 on MRI <= 2.1 and v0.4 on MRI > 2.1.

from fluent-plugin-influxdb.

repeatedly avatar repeatedly commented on September 27, 2024

I have just released v0.3.17 of the InfluxDB gem, backporting the bugfixes applied to the v0.4 tree

Thanks for great work!

it will pick up InfluxDB v0.3 on MRI <= 2.1 and v0.4 on MRI > 2.1.

No because rubygems doesn't have such metadata in one gemspec file. gemspec content is corresponding to each release, not entire project. fluent-gem install fluent-plugin-influxdb -v 1.0.0.rc2 will try to install latest influxdb gem and it causes same error on MRI <= 2.1.

from fluent-plugin-influxdb.

CheyiLin avatar CheyiLin commented on September 27, 2024

@dmke Thanks for the 0.3 backport! Just repack the docker image and everything works expected!
@repeatedly I think it's ok to close the issue since we don't have to change anything. πŸ˜„

Again, thanks for your great work!

Confirmed that the query result from influxdb HTTP API is correct now.

{
    "results": [
        {
            "statement_id": 0,
            "series": [
                {
                    "name": "system.filesystem",
                    "columns": [
                        "time",
                        "v.device_name",
                        "v.mount_point"
                    ],
                    "values": [
                        [
                            1501729298688,
                            "D:\\",
                            "D:\\"
                        ]
                    ]
                }
            ]
        }
    ]
}

from fluent-plugin-influxdb.

dmke avatar dmke commented on September 27, 2024

fluend-gem install ... will try to install latest influxdb gem and it causes same error on MRI <= 2.1

Well, in that case, you should stay on 0.3.x. Except for some more cleanup and refactoring, I don't have anything special planned for the 0.x series. For the time being, 0.3 and 0.4 should stay mostly compatible, with some minor new interfaces in 0.4.

However, when influxdata/influxdb#8477 lands, major refactoring in the client code will likely necessitate a 1.0 release of the InfluxDB gem (and, at this point, will drop MRI 2.1 support for good). (This will take some time, though.)

Confirmed that the query result from influxdb HTTP API is correct now.

πŸ‘ Yay! πŸŽ‰

from fluent-plugin-influxdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.