-
Notifications
You must be signed in to change notification settings - Fork 210
[GH-288] Add Support for WithSynchronousRefresh
Option in CachingProvider
for Blocking/Non-Blocking Key Refresh
#314
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #314 +/- ##
==========================================
+ Coverage 96.39% 96.66% +0.26%
==========================================
Files 8 8
Lines 361 390 +29
==========================================
+ Hits 348 377 +29
Misses 10 10
Partials 3 3 ☔ View full report in Codecov by Sentry. |
…e check final state
Hi folks, first off, thank you for your work on this library! The change made to the The fix isn't a big deal, but it's never ideal to introduce a breaking change when the sematic versioning isn't major version. Also, nothing I saw in the release notes suggested there was a change that needed to be made when switching versions. |
Hi @JohnRoesler, Sorry to hear that! I’ll take a closer look — it’s possible I may have overlooked something during testing. I tested with the existing test cases for options, but if you could share a code snippet of how you're using it, that would really help ensure this doesn’t happen again. I'll also review how I released the change, in case it unintentionally introduced a breaking change. Thanks for flagging it! |
hey @developerkunal thanks for the response. Here is what I had: And here is what i changed it to: optsInterface := make([]interface{}, len(opts))
for i := range opts {
optsInterface[i] = opts[i]
}
provider := jwks.NewCachingProvider(issuerURL, 5*time.Minute, optsInterface...) |
Hi @JohnRoesler, Thank you! I took a look and realized I missed this scenario in the release. It looks like we introduced a breaking change without announcing it — I’ll make sure to address it and include a proper announcement in the upcoming releases. |
@developerkunal I know it's hard, since it's such a small change, but it is breaking and any breaking change should come with a major version bump 😬 |
@JohnRoesler Totally agree — I’ll make sure to test things more thoroughly next time. |
📝 Checklist
🔧 Changes
Added support for blocking and non-blocking key refresh in
CachingProvider
by introducing theWithSynchronousRefresh
option.WithSynchronousRefresh
option to allow developers to choose between blocking and non-blocking key refresh.CachingProvider
to respect the selected refresh mode.📚 References
🔬 Testing