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

fix(pubsub): always make config check to prevent race #4606

Merged

Conversation

hongalex
Copy link
Member

In the previous iteration of this PR, #4602, the assumption was made that making the config check earlier will prevent race conditions in the test, which turned out to be incorrect. In addition, although previously ruled out as a solution, this PR makes it so that a config check is always made on the first call to Receive. I originally thought this would result in a poor experience for those users who don't have the roles/pubsub.viewer permission, but we default enableOrdering to true anyway if the config call fails due to lack of permissions. Using a default of true only negatively impacts those who don't want ordering on their subscription, and this behavior is already documented.

Fixes #3626

@hongalex hongalex requested review from a team as code owners August 13, 2021 04:27
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Aug 13, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 13, 2021
Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hongalex hongalex added the automerge Merge the pull request once unit tests and other checks pass. label Aug 13, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit 8cfcf53 into googleapis:master Aug 13, 2021
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Aug 13, 2021
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 Pub/Sub API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pubsub: TestIntegration_OrderedKeys_JSON failed
2 participants