Skip to content
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

Tibber Pulse: fix duplicate subscriptions #19011

Merged
merged 3 commits into from
Feb 21, 2025

Conversation

GrimmiMeloni
Copy link
Collaborator

@GrimmiMeloni GrimmiMeloni commented Feb 20, 2025

According to graphql-client maintainers, resubscribing after client disconnect has become counterproductive after the recent changes.
Removing the re-subscribe should fix the duplicate subscriptions observed here.

@andig I used go get github.com/hasura/go-graphql-client@5970b87 to update the client. Looking at the change set, I see there's now two entries for graphql in go.sum. Is this OK/correct, or should the previous entry be removed? If the latter, any reason why go get did not do so on its own?

Nevermind, broke porcelain - fixed it.

@GrimmiMeloni GrimmiMeloni requested a review from andig February 20, 2025 18:44
@GrimmiMeloni GrimmiMeloni self-assigned this Feb 20, 2025
@GrimmiMeloni GrimmiMeloni added the bug Something isn't working label Feb 20, 2025
@andig
Copy link
Member

andig commented Feb 20, 2025

Another great PR, thank you! Wondering: do we even need the ticker now? Is there anything stopping the client from running?

@GrimmiMeloni
Copy link
Collaborator Author

Another great PR, thank you! Wondering: do we even need the ticker now?

Yes. To my understanding we will otherwise see 429s again, regression of #18635

Is there anything stopping the client from running?

Yes, to my understanding, the part of the client lib that ends SubscriptionClient.Run() when failing the subscribe message is still in. So the client (i.e. .Run()) will still stop/exit when Tibber has its hiccup where it incorrectly claims the subscription is invalid.

@GrimmiMeloni
Copy link
Collaborator Author

Bonus question: Shall we inline Tibber.ensureSubscribed() again? We are back to only needing this during the first initialization.

@andig
Copy link
Member

andig commented Feb 21, 2025

Yes pls plus get rid of the membrr vars. Simpler to revert that commit?

@andig andig merged commit 6f3321c into evcc-io:master Feb 21, 2025
6 checks passed
@andig
Copy link
Member

andig commented Feb 21, 2025

Top, vielen Dank!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants