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 topic subscription path patterns #1592

Merged
merged 2 commits into from Mar 9, 2016
Merged

Fix topic subscription path patterns #1592

merged 2 commits into from Mar 9, 2016

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.

None yet

3 participants