Skip to content

Add InfluxDB customizer hook point #25319

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

Closed
wants to merge 3 commits into from

Conversation

eddumelendez
Copy link
Contributor

@eddumelendez eddumelendez commented Feb 17, 2021

More configuration properties are added in order to allow
customization for influxdb bean. Also, in order to
customize influxdb, InfluxDbCustomizer is added.

See gh-20867

More configuration properties are added in order to allow
customization for `influxdb` bean. Also, in order to
customize `BatchOptions`, `InfluxDbBatchOptionsCustomizer` is added.

See spring-projectsgh-20867
Copy link
Member

@snicoll snicoll 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 the PR @eddumelendez. This looks good (I had no idea we could expose so many options).

I think we need a InfluxDbPropertiesTests that validates the defaults are consistent (see other such *PropertiesTests for more details).

@snicoll snicoll added status: waiting-for-feedback We need additional information before we can continue type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 17, 2021
@snicoll snicoll added this to the 2.5.x milestone Feb 17, 2021
@eddumelendez
Copy link
Contributor Author

@snicoll thanks for the review and quickly replies. I will submit the changes later today.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Feb 17, 2021
* Add `InfluxDbPropertiesTests`
* Use `Duration` at `InfluxDbProperties`
* `InfluxDbCustomizer`
@snicoll snicoll self-assigned this Feb 22, 2021
@snicoll snicoll changed the title Add configuration properties to InfluxDb auto-configuration Add more customization options for InfluxDB Feb 22, 2021
@snicoll
Copy link
Member

snicoll commented Feb 22, 2021

Thanks for the follow-up @eddumelendez. I've polished the PR but I want to hold off as reviewing this made me realize about the new InfluxDB client. I think we need to investigate the changes before adding more properties here.

@snicoll snicoll added status: on-hold We can't start working on this issue yet for: team-meeting An issue we'd like to discuss as a team to make progress labels Feb 22, 2021
@philwebb philwebb removed the for: team-meeting An issue we'd like to discuss as a team to make progress label Feb 22, 2021
@snicoll snicoll changed the title Add more customization options for InfluxDB Add InfluxDB customizer hook point Feb 23, 2021
@snicoll snicoll removed status: feedback-provided Feedback has been provided status: on-hold We can't start working on this issue yet labels Feb 23, 2021
@snicoll
Copy link
Member

snicoll commented Feb 23, 2021

We've discussed this and decided to only include the customizer for now. Looking at the new client, concepts have changed in such a way that adding more properties would mean we'd be in a tricky situation when upgrading to it. On the contrary, we could easily add support for both clients with the support that we have.

@snicoll snicoll modified the milestones: 2.5.x, 2.5.0-M3 Feb 23, 2021
snicoll pushed a commit that referenced this pull request Feb 23, 2021
This commit augments the configuration properties that are exposed for
InfluxDB, alongside an `InfluxDbCustomizer` that gives more control.

See gh-25319
snicoll added a commit that referenced this pull request Feb 23, 2021
@snicoll snicoll closed this in 867367b Feb 23, 2021
@snicoll
Copy link
Member

snicoll commented Feb 23, 2021

I've pushed some hacking code to support the new driver as well, see https://github.com/snicoll/spring-boot/tree/influx-client-java

@bednar
Copy link

bednar commented Apr 6, 2021

Hi @snicoll,

we want to prepare a support for the new driver.

What is a best way how to do it in terms of packaging? I think there are two possibility how to do it:

  1. create new package org.springframework.boot.autoconfigure.influx2
  2. use existing package org.springframework.boot.autoconfigure.influx and an implementation for new client will have naming such as: InfluxDbClientAutoConfiguration, InfluxDbClientProperties, ...

Or is there different approach?

Regards

@snicoll
Copy link
Member

snicoll commented Apr 6, 2021

@bednar I've shared a commit in the comment just above yours, have you seen it?

@bednar
Copy link

bednar commented Apr 6, 2021

Yeah I saw it 😏... I just want to be sure that we will select correct path. Thanks for quick reply 👍

@snicoll
Copy link
Member

snicoll commented Apr 6, 2021

Not sure who is we. Given that I've already something, it would be better to get some feedback on that rather than working on a separate PR (if that's what you want to do).

@bednar
Copy link

bednar commented Apr 6, 2021

Not sure who is we.

I'm maintainer of influxdb-client-java

Given that I've already something, it would be better to get some feedback on that rather than working on a separate PR (if that's what you want to do).

I think that your implementation is fine (https://github.com/snicoll/spring-boot/tree/influx-client-java), just a preferred way for authentication is by token (https://github.com/snicoll/spring-boot/blob/0359550f4631ab1cdc41427ac83345438293f146/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/influx/InfluxDbClientAutoConfiguration.java#L52).

I can help you with tests and support for HealthIndicator.

@snicoll
Copy link
Member

snicoll commented Apr 6, 2021

I'm maintainer of influxdb-client-java

I am aware of that. I didn't understand what you mean by "we will select correct path".

I think that your implementation is fine (https://github.com/snicoll/spring-boot/tree/influx-client-java), just a preferred way for authentication is by token

Thank you for reviewing. Let's move this conversation on #25891. I know that token is preferred with v2 but that would introduce a v2 specific property and I am not sure yet we want to do that. I've flagged the issue for team meeting so that we can discuss our options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants