Copilot commented on code in PR #1470:
URL: https://github.com/apache/pulsar-client-go/pull/1470#discussion_r2944436340


##########
pulsaradmin/pkg/admin/topic.go:
##########
@@ -2032,6 +2038,15 @@ func (t *topics) GetReplicationClustersWithContext(ctx 
context.Context, topic ut
        return data, err
 }
 
+func (t *topics) RemoveReplicationClusters(topic utils.TopicName) error {
+       return t.RemoveReplicationClustersWithContext(context.Background(), 
topic)
+}
+
+func (t *topics) RemoveReplicationClustersWithContext(ctx context.Context, 
topic utils.TopicName) error {
+       endpoint := t.pulsar.endpoint(t.basePath, topic.GetRestPath(), 
"replication")
+       return t.pulsar.Client.DeleteWithContext(ctx, endpoint)

Review Comment:
   New RemoveReplicationClusters/RemoveReplicationClustersWithContext behavior 
isn’t covered by tests. There is already extensive coverage in topic_test.go 
for similar per-topic policies (set/get/remove + Eventually); please add a test 
that exercises the DELETE /{topic}/replication call path (or a unit test around 
the generated endpoint/HTTP method if integration env can’t support 
geo-replication).



##########
pulsaradmin/pkg/admin/topic.go:
##########
@@ -832,6 +832,12 @@ type Topics interface {
        //        list of replication cluster id
        SetReplicationClustersWithContext(ctx context.Context, topic 
utils.TopicName, data []string) error
 
+       // RemoveReplicationClusters removes the replication clusters override 
on a topic
+       RemoveReplicationClusters(topic utils.TopicName) error
+
+       // RemoveReplicationClustersWithContext removes the replication 
clusters override on a topic
+       RemoveReplicationClustersWithContext(ctx context.Context, topic 
utils.TopicName) error

Review Comment:
   The PR description still contains the unedited template placeholders (e.g., 
"Fixes #<xyz>", checklist text). Please update the description to reflect the 
actual motivation/changes and remove the template boilerplate before merging.



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