Skip to content

Fix topic subscription path patterns - #1592

Merged
tseaver merged 2 commits into
googleapis:masterfrom
tseaver:fix-topic-subscription-path-patterns
Mar 9, 2016
Merged

Fix topic subscription path patterns#1592
tseaver merged 2 commits into
googleapis:masterfrom
tseaver:fix-topic-subscription-path-patterns

Conversation

@tseaver

Copy link
Copy Markdown
Contributor

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.

@tseavertseaver 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
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 9, 2016
Comment threadgcloud/pubsub/_helpers.py Outdated
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
Copy Markdown
Contributor

FWIW I was fine without the regex 😀

@tseaver

Copy link
Copy Markdown
ContributorAuthor

@dhermes PTAL

@dhermes

Copy link
Copy Markdown
Contributor

LGTM.

Nit: %r is better than "%s"

tseaver added a commit that referenced this pull request Mar 9, 2016
@tseaver
tseaver merged commit 72617b3 into googleapis:masterMar 9, 2016
@tseaver
tseaver deleted the fix-topic-subscription-path-patterns branch March 9, 2016 22:45
@dhermesdhermes mentioned this pull request Apr 1, 2016
parthea pushed a commit that referenced this pull request Nov 26, 2025
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Mar 6, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Chalmer Lowe <chalmerlowe@google.com>
parthea pushed a commit that referenced this pull request Mar 9, 2026
* fix: flaky system tests for resumable_media
* resolving comments
parthea pushed a commit that referenced this pull request Apr 1, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsubIssues related to the Pub/Sub API.cla: yesThis human has signed the Contributor License Agreement.type: bugError 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

@tseaver@dhermes@googlebot