Skip to content

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

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

Closed
chrishiestand opened this issue Dec 8, 2015 · 4 comments
Closed
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@chrishiestand
Copy link
Contributor

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

chrishiestand added a commit to chrishiestand/gcloud-node that referenced this issue Dec 8, 2015
chrishiestand added a commit to chrishiestand/gcloud-node that referenced this issue Dec 8, 2015
@jgeewax
Copy link
Contributor

jgeewax commented Dec 8, 2015

Thanks for the super thorough report :) This is awesome. /cc @stephenplusplus

@stephenplusplus
Copy link
Contributor

Great report, indeed! Sorry you ran into this. I'll look it over in a little bit and try to squash it for good and put out a patch release.

@stephenplusplus stephenplusplus 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 Dec 8, 2015
@stephenplusplus
Copy link
Contributor

PR sent in #1008.

@chrishiestand
Copy link
Contributor Author

Thanks for the quick turnaround!

sofisl pushed a commit that referenced this issue Nov 11, 2022
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`^16.0.0` -> `^18.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/16.18.3/18.11.9) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/compatibility-slim/16.18.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/confidence-slim/16.18.3)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dialogflow).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yNDEuMTEiLCJ1cGRhdGVkSW5WZXIiOiIzNC4xMS4xIn0=-->
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 Pub/Sub API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants