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

Schema api not supporting pubsub emulator #647

Closed
bealsao opened this issue Apr 8, 2022 · 5 comments · Fixed by #658
Closed

Schema api not supporting pubsub emulator #647

bealsao opened this issue Apr 8, 2022 · 5 comments · Fixed by #658
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@bealsao
Copy link

bealsao commented Apr 8, 2022

The schema_service/client.py did not receive the fixes in this change: 297

So you receive the same errors as described in the issue: 290

I have created a fork where I added the code and verified this is all that needs to change for this to work with the pubsub emulator:

            emulator_host = os.environ.get("PUBSUB_EMULATOR_HOST")
            if emulator_host:
                if issubclass(Transport, type(self)._transport_registry["grpc"]):
                    channel = grpc.insecure_channel(target=emulator_host)
                else:
                    channel = grpc.aio.insecure_channel(target=emulator_host)
                Transport = functools.partial(Transport, channel=channel)

The fix is extremely simple as the work has already been done :)

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/python-pubsub API. label Apr 8, 2022
@bealsao
Copy link
Author

bealsao commented Apr 8, 2022

I can add a pull request if needed just let me know!

@acocuzzo
Copy link
Contributor

acocuzzo commented Apr 8, 2022

Hi @bealsao, please see https://github.com/googleapis/google-cloud-python/blob/main/CONTRIBUTING.rst for information about contributing, and I will take a look at your PR. Thanks in advance!

@meredithslota meredithslota added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. and removed type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Apr 8, 2022
@bealsao
Copy link
Author

bealsao commented Apr 10, 2022

Hi @acocuzzo,

PR created: 651

Thanks in advance,
Cheers

@acocuzzo
Copy link
Contributor

Thanks @bealsao. Can you please sign: https://cla.developers.google.com/clas
This will allow the CI to run on your PR. Thanks!

@bealsao
Copy link
Author

bealsao commented Apr 11, 2022

Hi @acocuzzo,

Sorry about that I fixed it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
3 participants