-
Notifications
You must be signed in to change notification settings - Fork 9
chore: limit retries for guide client subscribe #697
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
chore: limit retries for guide client subscribe #697
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 98fad19 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -263,7 +263,11 @@ describe("KnockGuideClient", () => { | |||
test("subscribes to socket events when socket is available", () => { | |||
const mockChannel = { | |||
join: vi.fn().mockReturnValue({ | |||
receive: vi.fn().mockReturnValue({ receive: vi.fn() }), | |||
receive: vi.fn().mockReturnValue({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relied heavily on Claude for writing these tests.
dd5b042
to
1293469
Compare
1293469
to
90bbb7e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #697 +/- ##
==========================================
+ Coverage 63.35% 63.46% +0.10%
==========================================
Files 181 181
Lines 7220 7247 +27
Branches 853 859 +6
==========================================
+ Hits 4574 4599 +25
- Misses 2620 2622 +2
Partials 26 26
|
Description
Currently the guide client keep retrying forever if it fails to join a guides channel for real time subscription. This can be due to network errors, but also includes auth errors or invalid channel ids. This PR sets a max retry limit at 3, similar to what we do in the main knock client.
References:
https://elixirforum.com/t/how-to-prevent-phoenix-from-retrying-to-connect-to-channel-when-auth-fails/63048
Linear:
KNO-8907