justinmclean opened a new issue, #4014:
URL: https://github.com/apache/iggy/issues/4014

   ### Description
   
   The Rust client exposes `create_partitions` and `delete_partitions` 
(`core/common/src/traits/partition_client.rs`); the Python SDK exposes neither, 
so a Python user cannot add or remove partitions on an existing topic without 
dropping to `send_binary_request`. Part of the parity work tracked in #3893.
   
     ```rust
     async fn create_partitions(&self, stream_id: &Identifier, topic_id: 
&Identifier,
                               partitions_count: u32) -> Result<(), IggyError>;
     async fn delete_partitions(&self, stream_id: &Identifier, topic_id: 
&Identifier,
                               partitions_count: u32) -> Result<(), IggyError>;
     ```
   
     Note that `delete_partitions` removes the last N partitions: a topic with 
5, minus 2, keeps partitions 1-3.
   
   ### Affected area / component
   
   _No response_
   
   ### Proposed solution
   
    - Add both methods to the `#[pymethods]` block in 
`foreign/python/src/client.rs`, taking `stream_id: PyIdentifier`, `topic_id: 
PyIdentifier` and `partitions_count: int`. Both return `None` on success and 
raise on failure, matching `delete_topic` alongside them.
     - Add the stub entries to `foreign/python/apache_iggy.pyi`.
     - Add `foreign/python/tests/test_partition.py`: create a topic, add 
partitions, assert the count via `get_topic`, delete partitions, assert the 
count again.
   
     No new wrapper types are needed. #3727 and #3776 are the closest worked 
examples of this shape of change.
   
   ### Alternatives considered
   
   _No response_
   
   ### Contribution
   
   - [ ] I'm willing to submit a pull request to implement this feature
   
   ### Good first issue
   
   - [x] I think this could be a good first issue for a new contributor


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