This is a problem in [email protected] and 0.25.0; v0.24.1 does not reproduce the problem. Tested with node v4 LTS.
The problem is that topics returned by pubsub.getTopics() are somehow constructed differently than pubsub.createTopic() - in that eventually the former uses an invalid url when topic.delete() is called.
It tries to send an api request to e.g. path: /v1/projects/projectname/topics/projects/projectname/topics/delme_704317
note the duplicated path portions.
See this for a reproducible test project:
https://github.com/chrishiestand/gcloud-node-pubsub-topic-bug
to reproduce:
just git clone, npm install, export GCLOUD_PROJECT=$project, and node index.js
This is a problem in [email protected] and 0.25.0; v0.24.1 does not reproduce the problem. Tested with node v4 LTS.
The problem is that topics returned by pubsub.getTopics() are somehow constructed differently than pubsub.createTopic() - in that eventually the former uses an invalid url when topic.delete() is called.
It tries to send an api request to e.g. path:
/v1/projects/projectname/topics/projects/projectname/topics/delme_704317note the duplicated path portions.
See this for a reproducible test project:
https://github.com/chrishiestand/gcloud-node-pubsub-topic-bug
to reproduce:
just
git clone,npm install,export GCLOUD_PROJECT=$project, andnode index.js