Skip to content

pubsub.getTopics() returns topics that throw error on topic.delete() #1005

@chrishiestand

Description

@chrishiestand

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

Metadata

Metadata

Labels

api: pubsubIssues related to the Pub/Sub API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions