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

Allow loading of config maps to be retried on failure #648

Closed
wants to merge 3 commits into from

Conversation

sagacity
Copy link

I'm trying to solve #441. There was already a pull request (#446) for this, but it stalled. Instead of rebasing that PR I've tried to simply add a wrapper around spring-retry, since the discussion in that pull request seemed to indicate this is a valid approach.

Can you confirm this approach would be ok for you? If so, I will spend some more time on the PR adding appropriate tests. Otherwise I'm open to changing directions.

The reason I didn't try to abstract away spring-retry is that it's a fairly well known project in the Spring ecosystem and it felt unnecessary to hide that. The configuration is set up so that if the dependency is not available retry logic will simply be unavailable and the old behaviour will be used.

@sagacity
Copy link
Author

sagacity commented Oct 6, 2020

A test is failing on CircleCI, but this seems unrelated to my change (a KubernetesClientTimeoutException)?

@sagacity
Copy link
Author

Any updates on this?

Copy link
Contributor

@ryanjbaxter ryanjbaxter left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for this PR!

I added support for reading ConfigMaps with the Kuberenetes Java client which unfortunately has caused a bunch of merge conflicts. Could we resolve those and maybe take a look at adding the same type of retry logic there as well?

Also could the same functionality be added for secrets?

@@ -49,8 +53,10 @@

@Bean
@ConditionalOnProperty(name = "spring.cloud.kubernetes.config.enabled", matchIfMissing = true)
public ConfigMapPropertySourceLocator configMapPropertySourceLocator(ConfigMapConfigProperties properties) {
return new ConfigMapPropertySourceLocator(this.client, properties);
public ConfigMapPropertySourceLocator configMapPropertySourceLocator(ConfigMapConfigProperties properties,
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of the Optional here I think it might be cleaner if you used @ConditionalOnMissingClass

@sagacity
Copy link
Author

sagacity commented Dec 8, 2020

@ryanjbaxter I am currently on paternity leave but hopefully I can take another look in the new year!

@ryanjbaxter
Copy link
Contributor

Great!

@sagacity
Copy link
Author

@ryanjbaxter I'm back from leave but unfortunately not in the position to continue work. @vy @breun any chance of picking this up?

@ryanjbaxter
Copy link
Contributor

No worries, I can probably take a look in a few weeks.

@wind57
Copy link
Contributor

wind57 commented Nov 1, 2021

@ryanjbaxter it seems this can be closed also, as we already have retry thx to the excellent effort from @isikerhan

@ryanjbaxter ryanjbaxter closed this Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants