GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — fix: raise a ValueError in BucketNotification.create() if a topic name is not set by cojenco · Pull Request #617 · googleapis/python-storage
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Conversation
Contributor
A PubSub topic (topic name) is required to insert a Raise a Add tests and revise conformance tests. Fixes #616 🦕
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
cojenco
marked this pull request as ready for review
unforced
approved these changes
tritone
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the error from the service currently if the topic name is not included? This might be fine, but in general we want to avoid overdoing it on client-side validation unless we have a good reason-- we want to let the service itself own most of this.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's two parts to answer your question. If the topic is not included, the server returns a 400 with error message In our client, on line 270, we preprocess the request body To avoid overdoing client-side validation, I could instead change the logic around preparing/formatting the topic.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah okay-- yeah I think in this case since we are constructing the topic client-side using
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've fixed the logic in constructing the topic. I like the idea of letting the service itself own the validation and aligning with the JSON API. Now the error from the server, if any, will bubble up directly. Will be merging the latest changes if no further questions. Thanks for the review @tritone!
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
cojenco
added a commit
to cojenco/python-storage
that referenced
this pull request
…e is not set (googleapis#617) * fix: topic name is required to create a notification. add check and tests * revise conf tests * fix topic formatting and remove extra validation * blacken lint * update docstrings
cojenco
added a commit
to cojenco/python-storage
that referenced
this pull request
…e is not set (googleapis#617) * fix: topic name is required to create a notification. add check and tests * revise conf tests * fix topic formatting and remove extra validation * blacken lint * update docstrings
gcf-merge-on-green Bot
pushed a commit
that referenced
this pull request
🤖 I have created a release \*beep\* \*boop\* --- ## [1.43.0](https://www.github.com/googleapis/python-storage/compare/v1.42.3...v1.43.0) (2021-11-15) ### Features * add ignore_flush parameter to BlobWriter ([#644](https://www.github.com/googleapis/python-storage/issues/644)) ([af9c9dc](https://www.github.com/googleapis/python-storage/commit/af9c9dc83d8582167b74105167af17c9809455de)) * add support for Python 3.10 ([#615](https://www.github.com/googleapis/python-storage/issues/615)) ([f81a2d0](https://www.github.com/googleapis/python-storage/commit/f81a2d054616c1ca1734997a16a8f47f98ab346b)) ### Bug Fixes * raise a ValueError in BucketNotification.create() if a topic name is not set ([#617](https://www.github.com/googleapis/python-storage/issues/617)) ([9dd78df](https://www.github.com/googleapis/python-storage/commit/9dd78df444d21af51af7858e8958b505a26c0b79)) ### Documentation * add contributing and authoring guides under samples/ ([#633](https://www.github.com/googleapis/python-storage/issues/633)) ([420591a](https://www.github.com/googleapis/python-storage/commit/420591a2b71f823dbe80f4a4405d8a514f87e0fb)) * add links to samples and how to guides ([#641](https://www.github.com/googleapis/python-storage/issues/641)) ([49f78b0](https://www.github.com/googleapis/python-storage/commit/49f78b09fed6d9f486639fd0a72542c30a0df084)) * add README to samples subdirectory ([#639](https://www.github.com/googleapis/python-storage/issues/639)) ([58af882](https://www.github.com/googleapis/python-storage/commit/58af882c047c31f59486513c568737082bca6350)) * update samples readme with cli args ([#651](https://www.github.com/googleapis/python-storage/issues/651)) ([75dda81](https://www.github.com/googleapis/python-storage/commit/75dda810e808074d18dfe7915f1403ad01bf2f02)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
api: storage
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. BucketNotification.create() does not check if a topic is providedUh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | ||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |