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

Documentation is misleading - Topic.createSubscription Subscription name is not optional #59

Closed
jeremy-albuixech opened this issue Feb 8, 2018 · 1 comment
Assignees
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. docs priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. triaged for GA type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@jeremy-albuixech
Copy link

I was trying to create a subscription with no name after reading some older threads in the old github (googleapis/google-cloud-node#1257 & googleapis/google-cloud-node#1799), especially about allowing subscription to get random names if no name was provided.

The documentation seems to be wrong on that particular point: https://cloud.google.com/nodejs/docs/reference/pubsub/0.16.x/Topic#createSubscription

In the table it says that the subscription name is an optional parameter, but in reality it will throw an error (which is actually explicitly specified in the Throws section of the documentation).

It's the same in the Subscription documentation: https://cloud.google.com/nodejs/docs/reference/pubsub/0.16.x/Subscription

Also, just to be sure, could you point me towards the PR that made the subscription name mandatory or what was the reasoning behind that ? In the scenario I'm in, it would be nice to have the possibility to have random / unique subscriptions to a topic, from what I read it was possible at some point so I'm curious to know why it was removed ? Thank you.

Environment details

  • OS: Ubuntu 16.04
  • Node.js version: 8.9.4
  • npm version: 5.5.1
  • @google-cloud/pubsub version: 0.16.2
@stephenplusplus stephenplusplus added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. docs labels Feb 9, 2018
@stephenplusplus
Copy link
Contributor

The docs are wrong :\ A name is required. I'll get a PR going to correct that.

As for why it's now required, as far as I know, it was requested by the Pub/Sub team to remove it. @callmehiphop any more info?

@stephenplusplus stephenplusplus self-assigned this Feb 9, 2018
stephenplusplus pushed a commit to stephenplusplus/nodejs-pubsub that referenced this issue Aug 31, 2018
@google-cloud-label-sync google-cloud-label-sync bot added the api: pubsub Issues related to the googleapis/nodejs-pubsub API. label Jan 31, 2020
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 6, 2020
feywind pushed a commit to feywind/nodejs-pubsub that referenced this issue Nov 12, 2024
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 googleapis/nodejs-pubsub API. docs priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. triaged for GA type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants