-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improving the release process #27829
Conversation
dev/breeze/src/airflow_breeze/commands/minor_release_command.py
Outdated
Show resolved
Hide resolved
Comment - this is super cool that breeze gets first "big" contribution like that :) Before the previous comment, I think (as mentioned in the other comment) it would be great if the release process is automatically tested in our CI (similarly to what we do for other release-management commands) - as this is the only way we can actually make sure the commands still work after any refactor/fix/etc. See for example here: airflow/.github/workflows/ci.yml Line 703 in 093345c
BTW. That made me realise that I lost the 'breeze release-management prepare-provider-documentation` command from CI and I need to restore it. PR for that shortly. |
@ephraimbuddy - the "prepare-provider-documenation" step is added here #27832 - let's see if it works fine. I think it will not work, I will have to add some other "bypass" there - becasue there is a question about the type of change as well, but I will add it when I see it (not)working. Something similar you will have to do in your PR, likely for some of the operations. i think it is entirely worthy of the effort - this way you do not have to worry during release if the tool still works or not. |
In my case, I wouldn't want to run some commands if the environment is CI, so I'm looking at sorting the commands that would run if |
Yep. Checking for CI is a good idea. |
Already in couple of places:
|
@potiuk, Concerning running this on the CI with The thought of a mistake makes me want to exclude it from what we should test on the CI. |
Setting --dry-run for all makes no sense indeed. But I think it makes perfect to do all the steps except pushing the changes (this can be skipped if CI). There is no risk involved. The tokens we have on CI in regular job are read-only so there is no risk we will actually persist any changes. The local repo is checked out locally and wiped out after the job is finished so any changes to it are not persisted - from what I see just "pushing" any changes will have to be "dry-runed" based on CI, all the other steps can be safely executed (and if you try to push something or otherwise change the state of repo - you will see a failure because the CI job has no permissions to change anything other than in local copy of the workspace. Those are the defauilt permissions in the ci.yml:
And in order for the job to have permission to change anything, it has to be given those permissions (this is for packages but
|
c4c4af7
to
6849d85
Compare
Nice. Thanks once more! |
6849d85
to
d1aa572
Compare
ea9eb83
to
06b09db
Compare
e13ccc9
to
0767279
Compare
c3dd3f2
to
9833431
Compare
Re-installing breeze didn't work. I will come back to debug it again, I believe it's from what now runs within the code in the CI unlike before when I skipped them. |
9833431
to
c1c6aa4
Compare
This PR aims to automate some parts of the release process. For RC, we have a command to run the release process: breeze release-management start-rc-process --version 2.4.3rc1 --previous-version 2.4.2 For release, the below command runs the process: breeze release-management start-release --release-candidate 2.4.3rc1 --previous-release <PREVIOUS RELEASE> And there's a command for creating a version branch when releasing a minor version: breeze release-management create-minor-branch --version-branch ${VERSION_BRANCH} Use breeze's user_confirm & get_console.print Skip some steps in CI Run command in CI add user_confirm_bool function, a version of user_confirm Remove retagging of images simplify console.print calls Update readme config hash Use dry-run for commands that shouldn't run in CI Remove outdated instruction Remove single quotes on double quote
c1c6aa4
to
b199f30
Compare
b199f30
to
6579cf6
Compare
Previously, some of the commands used to check out branches were being executed in the CI. However, because this change was not in the checked-out branch, the codes could not be found and the process failed. To resolve this issue, the solution was to run the branch check-out commands in dry-run mode. |
Nice! |
Feel free to merge if you think it's GOOD and useful :). |
Been thinking about the useful side of it :) let @jedcunningham decide |
Comment here - for @jedcunningham as well. But I wonder what others involved in the process think: I personally think it is super-useful. It makes the process repeatable but also it is largely self documenting. It's far easier to reason about it than README docs. But it does have some potential traps. Cons:
Pros:
My personal view: I personally usually err on the side of automation for those kind of things (as you are probably all well aware of that). One of the "features" of the Breeze rewrite in Python was to make it a little less magical - so that generally everyone here might understand and fix things. The fact that @ephraimbuddy wrote it largely himself with a little of my help is kinda proof that it works. Maybe it took a bit long and maybe there were a few things that require a bit more knowledge of the "magic" under-the-hood (especially when it comes to CI integration), but it was not that bad I think. I think there is a big benefit of automating - it makes it actually possible to speed up cadence of releases. This is what we also see wiht @eladkal releasing the providers in increased cadence now - I think it would not be possible if not the automation of the process. There are still things there that could be improved and automated more. And "Release early, release often" is the mantra that I will continuously repeat as the way how we can improve things. The "provider" release process (after Elad's few improvements/teething problems when he started doing it) allows to run it as often as we want by anyone. We can share the burden of relases among many people, because the mundane, easy to make mistake parts of the process will be automated and only the "interesting" part remains (reviewing the changes, cherry-picking them, communicating with people about testing etc. etc. I find those parts really important and interesting and there are things I would not even want to automate (rather to make it assisted by automation). This change above I think automates what's not "interesting" thus potentially opening the release process for more participants. Those my 3 cents. |
I'm not too concerned with it being "magic", I think we all can debug and carry on manually if things go sideways. Hopefully it doesn't, but historically we have improvements/fixes after most releases :) I'm not sure we should use this to widen our release manager pool or speed up cadence though. The challenging part isn't this part after all. It will remove some of the tedium though, which is always good. |
* Improving the release process This PR aims to automate some parts of the release process. For RC, we have a command to run the release process: breeze release-management start-rc-process --version 2.4.3rc1 --previous-version 2.4.2 For release, the below command runs the process: breeze release-management start-release --release-candidate 2.4.3rc1 --previous-release <PREVIOUS RELEASE> And there's a command for creating a version branch when releasing a minor version: breeze release-management create-minor-branch --version-branch ${VERSION_BRANCH} Use breeze's user_confirm & get_console.print Skip some steps in CI Run command in CI add user_confirm_bool function, a version of user_confirm Remove retagging of images simplify console.print calls Update readme config hash Use dry-run for commands that shouldn't run in CI Remove outdated instruction Remove single quotes on double quote * fixup! Improving the release process * fixup! fixup! Improving the release process * remove hidden arg from commands * Add check=True to all the run_command to raise when there's a failure * fixup! Add check=True to all the run_command to raise when there's a failure * Update minor release command * Update the ci (cherry picked from commit 9411e39)
This PR aims to automate some parts of the release process.
For RC, we have a command to run the release process:
breeze release-management start-rc-process --version 2.4.3rc1 --previous-version 2.4.2
For release, the below command runs the process:
breeze release-management start-release --release-candidate 2.4.3rc1 --previous-release <PREVIOUS RELEASE>
And there's a command for creating a version branch when releasing a minor version:
breeze release-management create-minor-branch --version-branch ${VERSION_BRANCH}