spring-boot-admin icon indicating copy to clipboard operation
spring-boot-admin copied to clipboard

Support Updating Environment in Spring Boot 1.5.x/Spring Cloud

Open steve-oakey opened this issue 7 years ago • 1 comments

I'm reporting this issue because we encounter it in our environment which is a mix of Spring Boot 1.5.x/Spring Cloud Dalston.SR5 and Spring Boot 2.1.x/Spring Cloud Greenwich.SR1 clients with a Spring Boot 2.1.4/Spring Cloud Greenwich.SR1/Spring Boot Admin 2.1.4 server. We are in the process of upgrading our clients so this problem should be relatively short lived, and it is probably a lesser used feature, so understandable if you'd rather not address it and say "upgrade your clients" instead :-)

The update environment MVC endpoint provided by Spring Cloud Commons changed between the 1.3.x (Dalston/Edgeware) and 2.0.x (Finchley) where the former accepted a Map of request parameters (see EnvironmentManagerMvcEndpoint) and the latter accepting a request payload with 1 key/value pair (see WritableEnvironmentEndpointWebExtension).

When trying to update the environment for a 1.5.x Spring Boot application, the operation appears to succeed (200 OK response from the server, green check in the UI) however the update does not get applied to the client. The HTTP request does not contain any request parameters hence the EnvironmentManagerMvcEndpoint

I could put together a sample, but it's probably not necessary since it's just a client using Spring Boot 1.5.x and Dalston.SR5.

steve-oakey avatar May 15 '19 18:05 steve-oakey

Thanks for reporting I was unaware of that. But like you already said, i'd suggest that you just should just update your clients as this is a lesser used feature and as Spring Boot 1.5 has it's EOL in August this year I don't think it is worth it. If you want to fix it you could write some InstanceExchangeFunctionFilter converting the request for this particular instance....

joshiste avatar May 16 '19 08:05 joshiste