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

Use node_name/0 to check the node origin - 1.4 #814

Conversation

thiamsantos
Copy link
Contributor

@thiamsantos thiamsantos commented Nov 29, 2019

Motivation

As reported on absinthe-graphql/absinthe_phoenix#63 the subscriptions messages are getting duplicated when using Redis Pubsub adapter.

Proposed solution

As pointed out by @benwilson512 the phoenix pubsub .... and the logic the code that performs this check was relying on a implementation detail of the PG2 adapter. This PR aims to change that verification to use the node_name function exposed by phoenix pubsub and wrapped by absinthe_phoenix for absinthe 1.4.

The implementation was manually tested against using this repo https://github.com/thiamsantos/subscription_test with both PG2 and redis as adapters.

Related

@benwilson512
Copy link
Contributor

benwilson512 commented Dec 3, 2019

I see you've marked this as a draft, do you have other changes planned?

@thiamsantos
Copy link
Contributor Author

@benwilson512 I'm planning to fully test it with both PG2 and redis adapters to make sure that no regressions will be introduced before marking as ready.

@thiamsantos thiamsantos changed the title Use node_name/0 to check the node origin Use node_name/0 to check the node origin - 1.4 Dec 4, 2019
@thiamsantos thiamsantos marked this pull request as ready for review December 4, 2019 00:24
@thiamsantos
Copy link
Contributor Author

@benwilson512 Sorry for the delay on it, I got myself a little free time today to properly test it.

I created two PRs in the hope to get a patch version for the absinthe 1.4 the one that we use in production.

I would love some feedback on those PRs :)

@benwilson512
Copy link
Contributor

Looks great! I'll cut releases later today.

@benwilson512 benwilson512 merged commit 3b05c2c into absinthe-graphql:v1.4 Dec 7, 2019
@philipbrown
Copy link

Was a 1.4 release created with this fix?

@benwilson512
Copy link
Contributor

Quite possibly not. Will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants