spring-cloud / spring-cloud/spring-cloud-config
Add ETag support to both server and client
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2k
- Forks
- 1.3k
- Avg merge
- 2d 59m
- Merged PRs (30d)
- 16
Description
Is your feature request related to a problem? Please describe.
The ETag is not returned from the server's API. There is no configuration to enable it.
The client doesn't make use of ETag at all.
Describe the solution you'd like
The ETag header can be easily added to the response header using the ShallowEtagHeaderFilter of Spring Web. This calculates the value from the response body. In case of GIT being configured as the environment repository, the ETag can be set to the value of the commit ID of the given label. This would simplify the ETag calculation (i.e. doesn't need to resolve all files) and would add the possibility to return ETag in the HEAD response body.
The client can then consider the ETag to figure out if it needs to fetch the configuration from the server again. This is useful in the configuration reload use cases.
Describe alternatives you've considered
none
Additional context
n/a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Spring Web server response path and the client configuration reload path; review how the Git environment repository exposes the commit ID and how HEAD responses are handled. Done means the server can return ETags, including the Git commit ID where applicable, and the client uses them to avoid unnecessary configuration fetches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, java, spring, spring-boot
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100