kafka icon indicating copy to clipboard operation
kafka copied to clipboard

KAFKA-16934: Clean up and refactor release.py

Open soarez opened this issue 1 year ago • 2 comments

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

soarez avatar Jun 11 '24 17:06 soarez

cc @jlprat

soarez avatar Jun 11 '24 17:06 soarez

Did you use this to release 3.7.1?

mimaison avatar Jul 01 '24 15:07 mimaison

@mimaison: Yes, I did.

soarez avatar Jul 01 '24 16:07 soarez

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.

mimaison avatar Jul 01 '24 18:07 mimaison

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

jlprat avatar Jul 02 '24 17:07 jlprat

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

soarez avatar Jul 03 '24 14:07 soarez

Yes, @jlprat please share any issues you run into.

soarez avatar Jul 03 '24 19:07 soarez

@jlprat I'd like to merge this, unless you have any concerns?

soarez avatar Jul 05 '24 09:07 soarez

I don't have any concerns :) Go ahead!

jlprat avatar Jul 05 '24 09:07 jlprat