8000 Fix topic subscription path patterns by tseaver · Pull Request #1592 · googleapis/google-cloud-python · GitHub
[go: up one dir, main page]

Skip to content

Conversation

tseaver
Copy link
Contributor
@tseaver tseaver commented Mar 9, 2016

Zawinski's Law strikes again!

Fix bug introduced in #1580, and surfaced in the system test failures following its merge.

Project IDs have embedded hyphens; topic / subscription names can have other punctuation.

This commit doesn't attempt to enforce the allowed punctuation, because we aren't validation user input with these patterns: we only use them to parse out project IDs / topic names / subscription names from values emitted by the back-end.

@tseaver tseaver added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: pubsub Issues related to the Pub/Sub API. labels Mar 9, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 9, 2016
from gcloud._helpers import _name_from_project_path


_topic_template = re.compile(r"""

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor
dhermes commented Mar 9, 2016

FWIW I was fine without the regex 😀

@tseaver
Copy link
Contributor Author
tseaver commented Mar 9, 2016

@dhermes PTAL

@dhermes
Copy link
Contributor
dhermes commented Mar 9, 2016

LGTM.

Nit: %r is better than "%s"

tseaver added a commit that referenced this pull request Mar 9, 2016
…terns

Fix topic subscription path patterns
@tseaver tseaver merged commit 72617b3 into googleapis:master Mar 9, 2016
@tseaver tseaver deleted the fix-topic-subscription-path-patterns branch March 9, 2016 22:45
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. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0