-
-
Notifications
You must be signed in to change notification settings - Fork 547
feat(influxdb): support for influxdbv2 #3072
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
feat(influxdb): support for influxdbv2 #3072
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, a few suggestions and clarifying question
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments. I do not have a strong opinion on the Nil Vs zero values discussion, as I see the value in separating required Vs optional values using pointers.
We are usually setting zero values, in general, without complains for our users, so I'd say we are fine not using pointers, checking the zero value was not set (booleans raising hands atm 😄 )
modules/influxdb/influxdb_test.go
Outdated
@@ -7,6 +7,7 @@ import ( | |||
"testing" | |||
"time" | |||
|
|||
influxdb2 "github.com/influxdata/influxdb-client-go/v2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: for consistency with the v1 import
influxdb2 "github.com/influxdata/influxdb-client-go/v2" | |
influxclient2 "github.com/influxdata/influxdb-client-go/v2" |
a7980d8
to
e88aa32
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with clarification of previous asks, hopefully this makes sense.
Having thought about this more, the big config struct is an antipattern to functional options, sorry for not spotting this earlier, see comments for details.
e88aa32
to
d2dddf3
Compare
d2dddf3
to
1194362
Compare
* main: feat(postgres): add WithOrderedInitScripts for Postgres testcontainers (testcontainers#3121) feat(redis): add TLS support (testcontainers#3115) feat: add Docker Model Runner module (testcontainers#3106) feat: add toxiproxy module (testcontainers#3092) chore(ci): run core tests on Testcontainers Cloud (testcontainers#3117) deps(aerospike): replace core module in go.mod (testcontainers#3116) chore(deps): bump golang.org/x/net from 0.36.0 to 0.38.0 in /modules and /examples (testcontainers#3114) chore(ci): revert codeql improvements for CI resiliency (testcontainers#3112) docs(socat): add missing version marker for new options (testcontainers#3111) deps: use pinned dependencies on GH actions (testcontainers#3110) chore(deps): bump jinja2 from 3.1.5 to 3.1.6 (testcontainers#3109) chore(ci): reduce GH runners usage by calling codeql in the lint stage (testcontainers#3108) deps(ci): use python 3.13 on Netlify deployments (testcontainers#3107)
@xBlaz3kx I added a commit on top of yours, if you approve, I'm merging this PR, thanks! |
Sounds good! |
@stevenh all good with this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* main: chore(deps): bump mkdocs-include-markdown-plugin from 6.2.2 to 7.1.5 (testcontainers#3119) chore(deps): bump github.com/magiconair/properties from 1.8.9 to 1.8.10 (testcontainers#3118) chore(ci): exclude more files for a full-blown build (testcontainers#3122) feat(influxdb): support for influxdbv2 (testcontainers#3072)
Feature
What does this PR do?
I added a
WithV2Env
option to the InfluxDB module to setup the V2 instance correctly according to their confguration guidelines. Added tests for changes and updated docs/examples for setting up a V2 instance.Why is it important?
Lack of documentation on how to setup V2 instances and prettified the workaround with a neater solution (custom options with configuration for V2).
Related issues