danhuawang commented on issue #9166:
URL: https://github.com/apache/gravitino/issues/9166#issuecomment-3550469815

   Reproduce steps:
   
   1.  create a topic named `topic1119a` without comment in request body:
   ```
   curl -X POST  -H "Content-Type: application/json"   -H "Authorization: Basic 
YW5vbnltb3VzOnRlc3QK" 
http://127.0.0.1:8090/api/metalakes/test_metalake1/catalogs/catalog_kafka/schemas/default/topics
 -d '{
     "name": "topic1119a",
     "properties": {
       "partition-count": "3",
       "replication-factor": 1
     }
   }'
   ```
   2. update comment for `topic1119a` 
   
   ```
   curl -X PUT   -H "Content-Type: application/json"   -H "Authorization: Basic 
YW5vbnltb3VzOnRlc3QK" 
http://127.0.0.1:8090/api/metalakes/test_metalake1/catalogs/catalog_kafka/schemas/default/topics/topic1119a
 -d '{
   "updates": [
   {
   "@type": "updateComment",
   "newComment": "This is the new comment"
   }
   ]
   }'
   ```
   
   3. load topic  `topic1119a` , there's no comment
   ```
   curl -X GET   -H "Content-Type: application/json"   -H "Authorization: Basic 
YW5vbnltb3VzOnRlc3QK" 
http://127.0.0.1:8090/api/metalakes/test_metalake1/catalogs/catalog_kafka/schemas/default/topics/topic1119a
   ```
   
   4. create a topic named `topic1119b` with comment in request body:
   
   ```
   curl -X POST   -H "Content-Type: application/json"   -H "Authorization: 
Basic YW5vbnltb3VzOnRlc3QK" 
http://127.0.0.1:8090/api/metalakes/test_metalake1/catalogs/catalog_kafka/schemas/default/topics
 -d '{
     "name": "topic1119b",
     "comment":"topic1119b",
     "properties": {
       "partition-count": "3",
       "replication-factor": 1
     }
   }'
   ```
   
   5. load  `topic1119b` ,there's comment
   ```
   curl -X GET   -H "Content-Type: application/json"   -H "Authorization: Basic 
YW5vbnltb3VzOnRlc3QK" 
http://127.0.0.1:8090/api/metalakes/test_metalake1/catalogs/catalog_kafka/schemas/default/topics/topic1119b
   ```
   
   6. update comment for `topic1119b` 
   ```
   curl -X PUT   -H "Content-Type: application/json"   -H "Authorization: Basic 
YW5vbnltb3VzOnRlc3QK" 
http://127.0.0.1:8090/api/metalakes/test_metalake1/catalogs/catalog_kafka/schemas/default/topics/topic1119b
 -d '{
   "updates": [
   {
   "@type": "updateComment",
   "newComment": "topic1119b,This is the new comment"
   }
   ]
   }'
   ```
   5. load  `topic1119b` again ,there's new comment.
   ```
   curl -X GET   -H "Content-Type: application/json"   -H "Authorization: Basic 
YW5vbnltb3VzOnRlc3QK" 
http://127.0.0.1:8090/api/metalakes/test_metalake1/catalogs/catalog_kafka/schemas/default/topics/topic1119b
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to