Open
Description
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