spring-cloud / spring-cloud/spring-cloud-commons

Decouple restart functionality from actuator endpoint

Open
#1,156 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
Dominant language
Java
Stars
751
Forks
744
Avg merge
1d 14h
Merged PRs (30d)
9

Description

Is your feature request related to a problem? Please describe.

In Spring Cloud AWS we are implementing restarting/refreshing context when properties loaded from Secrets Manager or Parameter Store change. Depending on the reload strategy chosen by users, we either refresh or restart the context. Because the restart functionality is baked into the RestartEndpoint, restarting must rely on the presence of the Spring Boot's actuator.

Checking for changes happens in the background thread without any action taken by the user like calling actuator endpoint.

https://github.com/awspring/spring-cloud-aws/blob/secretsmanager-reload/spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/config/reload/ConfigurationUpdateStrategy.java#L44

Describe the solution you'd like

Decouple core restart functionality from RestartEndpoint making it possible to use in scenarios other than calling actuator endpoint even if restart endpoint is not enabled.

Describe alternatives you've considered

Currently we enable restart functionality only if actuator is present and restart endpoint is enabled (but I don't think this is a right way to go).

Additional context

Implementation is very much inspired by one in Spring Cloud Kubernetes so I think this change would benefit both projects.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ConfigurationUpdateStrategy.java at the referenced reload-strategy entry point and inspect how it depends on Spring Boot's RestartEndpoint. Compare that integration with the described Spring Cloud Kubernetes implementation. Done means restart functionality can be used by background configuration reloads without requiring the actuator or an enabled restart endpoint.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.