KAFKA-16934: Clean up and refactor release.py
The current release script has a couple of issues:
- It's a single long file with duplicated logic, which makes it difficult to understand and make changes
- When a command fails, the user is forced to start from the beginning, expanding feedback loops. e.g. publishing step fails because the credentials were set incorrectly in ~/.gradle/gradle.properties
This change moves release.py and release_notes.py into new components under release/.
cc @jlprat
Did you use this to release 3.7.1?
@mimaison: Yes, I did.
That's great to hear you beta tested it! In that case, I think we can go ahead and try to get this merged soon, and hopefully we won't disturb the 3.8.0 release. It's also good Josep had a look already so it's not a complete surprise for him.
I'll try to make another pass this week.
I wanted to use this script to release 3.8 now that is finally unblocked. I'll test it and feedback here anything that doesn't work
@mimaison I suspect some of the difficulty comes from the reason for this PR: the current script is difficult to reason about. If you think it would help with the review, I can look into adding unit tests for some of new modules here. The downside is that the diff will be even larger. I'm also not sure how we'd plug them into CI, but you could run them locally.
Yes, @jlprat please share any issues you run into.
@jlprat I'd like to merge this, unless you have any concerns?
I don't have any concerns :) Go ahead!