feat: Add support for HTTP eTag header and 304 no change response#1645
feat: Add support for HTTP eTag header and 304 no change response#1645toddbaert merged 9 commits intoopen-feature:mainfrom
Conversation
✅ Deploy Preview for polite-licorice-3db33c canceled.
|
cf5af70 to
747c879
Compare
Signed-off-by: Zhiwei Liang <[email protected]>
Signed-off-by: Zhiwei Liang <[email protected]>
Signed-off-by: Zhiwei Liang <[email protected]>
bbe70e9 to
fc61a8c
Compare
aepfli
left a comment
There was a problem hiding this comment.
thank you, this is a really great addition. We should also update the readme, to inform people about this behavior, as this might not be as obvious at the beginning
|
@aepfli Thank you for the suggestion! May I know which README should be changed? The one in the root directory of the repository doesn't seem to be describing sync behaviors? |
|
@ChihweiLHBird, it may be worth mentioning the eTag behavior here. Thanks! |
|
I'll merge this now since it should be transparent to end users. |
Signed-off-by: Zhiwei Liang <[email protected]>
|
Hi @beeme1mr, I just added some description, but I am not very good at doc writing. So, let me know if you want to rephrase/rewrite my doc or anything. Thank you! |
Signed-off-by: Zhiwei Liang <[email protected]>
Signed-off-by: Zhiwei Liang <[email protected]>
|
I'm going to review this myself today and fix the conflict, then I'll merge. |
Signed-off-by: Todd Baert <[email protected]>
toddbaert
left a comment
There was a problem hiding this comment.
Docs and everything looks great to me. Fixed a conflict, will merge once CI is done.
| return &http.Response{ | ||
| Header: map[string][]string{ | ||
| "Content-Type": {"application/json"}, | ||
| "Etag": {newETag}, |
There was a problem hiding this comment.
One thing worth mention here is that the http package apparently doesn't handle case insensitive well and I had to make this testing header to be Etag (small case t), even though in real world usage (non-testing), ETag works well.
There was a problem hiding this comment.
I guess building the header with the Header().Set() function rather than passing in a raw map will fix it but I didn't have time to try at this time.
🤖 I have created a release *beep* *boop* --- <details><summary>flagd: 0.12.8</summary> ## [0.12.8](flagd/v0.12.7...flagd/v0.12.8) (2025-07-21) ### 🐛 Bug Fixes * update to latest otel semconv ([#1668](#1668)) ([81855d7](81855d7)) ### 🧹 Chore * **deps:** update module github.com/open-feature/flagd/core to v0.11.8 ([#1685](#1685)) ([c07ffba](c07ffba)) </details> <details><summary>flagd-proxy: 0.8.0</summary> ## [0.8.0](flagd-proxy/v0.7.6...flagd-proxy/v0.8.0) (2025-07-21) ### ⚠ BREAKING CHANGES * remove sync.Type ([#1691](#1691)) ### ✨ New Features * remove sync.Type ([#1691](#1691)) ([ac647e0](ac647e0)) ### 🧹 Chore * **deps:** update module github.com/open-feature/flagd/core to v0.11.8 ([#1685](#1685)) ([c07ffba](c07ffba)) </details> <details><summary>core: 0.12.0</summary> ## [0.12.0](core/v0.11.8...core/v0.12.0) (2025-07-21) ### ⚠ BREAKING CHANGES * remove sync.Type ([#1691](#1691)) ### 🐛 Bug Fixes * update to latest otel semconv ([#1668](#1668)) ([81855d7](81855d7)) ### ✨ New Features * Add support for HTTP eTag header and 304 no change response ([#1645](#1645)) ([ea3be4f](ea3be4f)) * remove sync.Type ([#1691](#1691)) ([ac647e0](ac647e0)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: OpenFeature Bot <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR
eTagrequest header and304 Not Modifiedresponse.Related Issues
Fixes #1558
Notes
This proposal includes some significant behavior changes; therefore, any feedback, opinions, or objections are welcome and appreciated.
How to test
More specific test cases to be added when we all agree on proceeding with the implementation of the change in this PR.