-
Notifications
You must be signed in to change notification settings - Fork 233
Closed
Labels
🚨This issue needs some love.This issue needs some love.api: pubsubIssues related to the googleapis/nodejs-pubsub API.Issues related to the googleapis/nodejs-pubsub API.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
- OS: OSX 10.13.3
- Node.js version: v8.9.1
- npm version: 5.6.0
@google-cloud/pubsubversion: 0.18.0
Steps to reproduce
- Create topic
foo - Create topic
bar - Create subscription
quixon topicfoo - Create subscription
quixon topicbar(this is successful?)
If a subscription name already exists for a topic the client doesn't ensure it matches the same topic for the existing resource.
This check allows the subscription to appear to be created successfully despite <topic, name> pair not matching the original resource:
https://github.com/googleapis/nodejs-pubsub/blob/master/src/index.js#L249
Error caught internally:
err is: { Error: Resource already exists in the project (resource=quix).
at /tmp/test/grpc/src/client.js:554:15
code: 6,
metadata: Metadata { _internal_repr: {} },
note: 'Exception occurred in retry method that was not classified as transient' }
Ideally createSubscription would fail when the topic name doesn't match the existing resource.
tarikki, jamesholcomb and avocadoslab
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.api: pubsubIssues related to the googleapis/nodejs-pubsub API.Issues related to the googleapis/nodejs-pubsub API.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.