Skip to content

feat(kafka topic): partitions flag for update#823

Merged
rkpattnaik780 merged 3 commits intomainfrom
partitions_update
Jul 21, 2021
Merged

feat(kafka topic): partitions flag for update#823
rkpattnaik780 merged 3 commits intomainfrom
partitions_update

Conversation

@rkpattnaik780
Copy link
Contributor

User should be able to update number of partitions in a topic. The number of partitions can only increase.

Closes #762

Verification Steps

  1. Create a Kafka topic and update its partition count using --partitions flag.
./rhoas kafka topic update rama-topic --partitions 5
  1. Partitions can only increase, trying to reduce number of partitions should throw error.
  2. Validate the interactive update flow. Try providing values smaller and bigger than current partitions count.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation change
  • Other (please specify)

Checklist

  • Documentation added for the feature
  • CI and all relevant tests are passing
  • Code Review completed
  • Verified independently by reviewer

@rkpattnaik780
Copy link
Contributor Author

While updating non-interactive mode for updating partition topic, this is the displayed error:
Screenshot from 2021-07-15 14-24-36
Should we set the error message in case statuscode.badrequest? But again a bad request can mean many things and not only invalid partitions.

@rkpattnaik780 rkpattnaik780 requested a review from wtrocki July 15, 2021 09:03
@wtrocki
Copy link
Collaborator

wtrocki commented Jul 18, 2021

Should we set the error message in case statuscode.badrequest? But again a bad request can mean many things and not only invalid partitions.

That would be typically only status code. We need backend to return error codes like kafka and map them properly. If we not getting any info back that can be used to know type of errror I would recomend to:

  • Create issue in kafka backend to discuss it
  • create issue in cli to adjust error messages/handling when backend support it.

Copy link
Collaborator

@wtrocki wtrocki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no means to verify but all changes look good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to update the number of partitions for a Kafka topic

2 participants