Skip to content

add namespace get-topic-auto-creation cmd#2025

Open
nlu90 wants to merge 1 commit intomasterfrom
neng/ns-get-topic-auto-creation
Open

add namespace get-topic-auto-creation cmd#2025
nlu90 wants to merge 1 commit intomasterfrom
neng/ns-get-topic-auto-creation

Conversation

@nlu90
Copy link
Contributor

@nlu90 nlu90 commented Mar 13, 2026

(If this PR fixes a github issue, please add Fixes #<xyz>.)

Fixes #

(or if this PR is one task of a github issue, please add Master Issue: #<xyz> to link to the master issue.)

Master Issue: #

Motivation

pulsarctl namespaces had set-topic-auto-creation and remove-topic-auto-creation, but it was missing get-topic-auto-creation. That made it impossible to check the namespace-level setting directly from the CLI.

Modifications

Added get-topic-auto-creation to the namespace commands and wired it to the existing admin API.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@github-actions
Copy link

@nlu90:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@github-actions github-actions bot added the doc-info-missing This pr needs to mark a document option in description label Mar 13, 2026
@nlu90
Copy link
Contributor Author

nlu90 commented Mar 13, 2026

Test:

== Create namespace ==

+ ./bin/pulsarctl -s http://localhost:8080 namespaces create public/test-topic-auto-creation-1773422021
Created public/test-topic-auto-creation-1773422021 successfully

== Set topic auto-creation ==
Set topic auto-creation config successfully for [public/test-topic-auto-creation-1773422021]

== Get topic auto-creation ==
{
  "allowAutoTopicCreation": true,
  "topicType": "partitioned",
  "defaultNumPartitions": 2
}

== Remove topic auto-creation override ==
Removed topic auto-creation config successfully for [public/test-topic-auto-creation-1773422021]

== Verify override removed ==
null

@nlu90 nlu90 force-pushed the neng/ns-get-topic-auto-creation branch from 28963ec to 47697ac Compare March 19, 2026 16:10
@nlu90 nlu90 requested review from a team as code owners March 19, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-info-missing This pr needs to mark a document option in description

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant