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 admin props failing on duration types #240

Merged
merged 1 commit into from
Nov 27, 2022

Conversation

onobc
Copy link
Collaborator

@onobc onobc commented Nov 26, 2022

if (conf.remove("connectTimeout") instanceof Duration connectTimeout) {
builder.connectionTimeout((int) connectTimeout.toMillis(), TimeUnit.MILLISECONDS);

// Workaround the fact that the PulsarAdminImpl does not attempt to construct the
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I would like to move this to PulsarAdminBuilderImpl.loadConf like we did for the auth stuff below.

Copy link
Collaborator Author

@onobc onobc Nov 27, 2022

Choose a reason for hiding this comment

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

@cbornet - I added #245 to track replacement once fixed in Pulsar 2.12.

@onobc
Copy link
Collaborator Author

onobc commented Nov 27, 2022

I am going to merge this in order to get a 🟢 on the CI as I have a follow on PR to bump to SB3.0.0.

Any PR suggestions I will gladly handle post-merge (cc: @cbornet )

@onobc onobc merged commit a65a37b into spring-projects:main Nov 27, 2022
@onobc onobc deleted the cbono-fix-adminprops branch November 27, 2022 01:04
map.from(this::getConnectionTimeout).asInt(Duration::toMillis).to(properties.in("connectionTimeoutMs"));
map.from(this::getReadTimeout).asInt(Duration::toMillis).to(properties.in("readTimeoutMs"));
map.from(this::getRequestTimeout).asInt(Duration::toMillis).to(properties.in("requestTimeoutMs"));
map.from(this::getAutoCertRefreshTime).asInt(Duration::toMillis).to(properties.in("autoCertRefreshTimeMs"));
Copy link
Contributor

Choose a reason for hiding this comment

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

For autoCertRefreshTime we should convert to seconds.

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

Successfully merging this pull request may close these issues.

AdminProperties failing on duration values
2 participants