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

[TOPIC] si topic delete does not work with space API #917

Open
a-tylenda opened this issue Jul 21, 2023 · 0 comments
Open

[TOPIC] si topic delete does not work with space API #917

a-tylenda opened this issue Jul 21, 2023 · 0 comments
Labels
read Read by sequences

Comments

@a-tylenda
Copy link
Contributor

Describe the bug
When deleting topic using CLI:

si topic delete <topicName>

the topic is deleted only on the hub topic list. It stays on the space topic list.

Steps to Reproduce
In the local infrastructure MW MM, sth-1, sth-2

1. I create a topic named newTopic on sth-1

si hub use sth-1

si topic get newTopic

2. I check topic list on sth-1, topic is present on the list:

$ si topic ls
[
  {
    contentType: 'text/plain',
    localProvider: '',
    topic: 'newTopic',
    topicName: 'newTopic'
  }
]

3. I check list on sth-2, topic is not present on the list.

$ si hub use sth-2

$ si topic ls
[]

4. I check topic list on space, topic is present on the list

curl GET 'http://0.0.0.0:7000/api/v1/space/org-ad6fcd3f-872b-4f7c-b84a-fc64e0a4ad41-manager/api/v1/topics' -s |jq
[
  {
    "name": "newTopic",
    "contentType": "application/x-ndjson",
    "actors": [
      {
        "role": "consumer",
        "type": "host",
        "stream": false,
        "hostId": "sth-1",
        "retired": false
      }
    ]
  }
]

6. When I delete topic it is removed only on the hub I am connected to:

$ si hub use sth-1

$ si topic delete newTopic
{ message: 'Topic newTopic removed' }

$ si topic ls
[]

but it is still present on the space topic list:

$ curl GET 'http://0.0.0.0:7000/api/v1/space/org-ad6fcd3f-872b-4f7c-b84a-fc64e0a4ad41-manager/api/v1/topics' -s |jq
[
  {
    "name": "newTopic",
    "contentType": "application/x-ndjson",
    "actors": [
      {
        "role": "consumer",
        "type": "host",
        "stream": false,
        "hostId": "sth-1",
        "retired": false
      }
    ]
  }
]

Expected behavior
When deleting the topic it should be removed from all the lists, space topic list, and all the hubs.

Version (please complete the following information):

  • STH version: 0.35.0
  • SI version: 0.35.0
  • node version: v18.15.0
  • os: Ubuntu 20.4
@scramjet-bot scramjet-bot added the read Read by sequences label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
read Read by sequences
Projects
None yet
Development

No branches or pull requests

2 participants