ChimdumebiNebolisa opened a new pull request, #25163:
URL: https://github.com/apache/pulsar/pull/25163

   Fixes #24998
   
   ### Motivation
   The current namespace `autoTopicCreation` override validation rejects 
`defaultNumPartitions` when `topicType=non-partitioned`. This forces clients 
and IaC tooling to conditionally omit a field based on topic type, which makes 
the API less consistent and more error-prone.
   
   ### Modifications
   - Relaxed `AutoTopicCreationOverride` validation to allow 
`defaultNumPartitions` to be set when `topicType=non-partitioned` (value is 
accepted and persisted).
   - Kept runtime behavior unchanged: `defaultNumPartitions` is still only used 
for partitioned auto-creation.
   - Updated unit test expectations and added a broker test to verify the value 
is ignored during non-partitioned topic creation.
   
   ### Verifying this change
   This change added tests and can be verified as follows:
   - `mvn -pl pulsar-common -Dtest=AutoTopicCreationOverrideTest test`
   - `mvn -pl pulsar-broker -am 
-Dtest=AdminApi2Test#testAutoTopicCreationOverrideNonPartitionedDefaultNumPartitionsIgnored
 -Dsurefire.failIfNoSpecifiedTests=false test`
   
   ### Does this pull request potentially affect one of the following parts:
   - [ ] Dependencies (add or upgrade a dependency)
   - [x] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [x] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### Documentation
   - [x] `doc-not-needed`
   
   ### Matching PR in forked repository
   PR in forked repository: <PASTE YOUR PR URL HERE>
   


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