-
Notifications
You must be signed in to change notification settings - Fork 82
SOP: how to build a hotfix #4056
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
base: main
Are you sure you want to change the base?
Conversation
|
Please comment about the last section. |
Pull Request validationFailed🔴 Review - Missing review from a member (2 required) Success🟢 CI - All checks have passed |
|
|
||
| Create hotfix branch ($DATE is date of last release): | ||
|
|
||
| git branch hotfix-$DATE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also git checkout ..., otherwise we git reset the main branch later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean by this rebasing on the upstream/main before creating the hotfix branch, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a description for creating the branch. This part can be (should be) skipped on subsequent runs. As written in the first paragraph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The git checkout is still missing here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??? Can you write that command? I have no idea what you mean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git branch hotfix-$DATE
git checkout hotfix-$DATE
|
|
||
| optionally you can change even: | ||
|
|
||
| builder = tito.builder.UpstreamBuilder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I should commit those changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so, can you please add the command with already prepared commit message, so that we can easily copy-paste it from the docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nod I added git-commit
doc/how_to_build_hotfix.rst
Outdated
|
|
||
| git branch hotfix-$DATE | ||
|
|
||
| Return in history to commit that points to latest commit tagging packages for the release: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a bit hard choice, not sure, we'll see in practice. Consider history like (last commit goes first)
- aaa: to-be-hotfixed commit to python-copr
- bbb: irrelevant commit for copr-backend
- ccc: [python-copr] tagged
- ddd: to-be-hotfixed commit to copr-backend
- eee: [copr-backend] taged
- fff: [copr-frontend] tagged
- 000: other commit covered by subsequent tags
Now, I want a hot-fix branch, and have a hot-fix for both [python-copr] and [copr-backend]. Where do I start?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we just cherry pick the relevant commits instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed by:
If multiple packages were tagged during the release, choose the commit related to latest package in the release
doc/how_to_build_hotfix.rst
Outdated
| and walk the directories of packages listed. For every SPEC file make sure that `Version` tag has `^hotfix` at the end. | ||
| This ensure that the hotfix version is higher than any rebuild in Fedora. | ||
|
|
||
| 1.1-5 < 1.1^hotfix-1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use . instead of ^?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
doc/how_to_build_hotfix.rst
Outdated
|
|
||
| or | ||
|
|
||
| Create hotfix project in Copr itself. Enable this repo in production. Build there the hotfix and install from Copr. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point in time, we have those files most likely patched in production, vim-modified, I know -- 🥇.
Anyway, that's the most convenient thing to do and I doubt it makes any sense to change our practice; IOW we are not in hurry, we can simply wait till the package gets to infra tags -- and then do a no-brainer dnf update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, that's the most convenient thing to do and I doubt it makes any sense to change our practice;
meaning of this is not creating this SOP? or is it encouragement to follow the https://docs.pagure.org/copr.copr/how_to_release_copr.html#build-packages-for-production ?
tbh I am against both, current status is definitely not ideal, yep. And having it released to fedora bring no benefits in my view... only adding boring process at the end of creating of the hotfix... is there really some big difference for us to have the hotfix directly to fedora that makes it no-brainer? Is there some benefit I am missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant that even with this (a go-to, really) SOP, you can still edit with vim, but then you must provide a hot-fix package and simply run dnf update to apply it (in an hour or so..).
|
Thank you very much for the document, @xsuchy 🚀 |
| @@ -0,0 +1,75 @@ | |||
| .. _how_to_build_hotfix: | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably link this from the maintenance_documentation.rst
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
we could test this on #4092 after new year to unblock packit/packit-service#2907 :) |
| Edit `tito.props` to: | ||
|
|
||
| tagger = tito.tagger.ReleaseTagger | ||
|
|
||
| optionally you can change even: | ||
|
|
||
| builder = tito.builder.UpstreamBuilder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to (just personal wish) have here short description (a few words) about what is the use case when I should include also the second (builder) option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, would "Check man(5) releasers.conf" be enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
|
Ready for review. |
|
LGTM, just please mention that we need to switch into the newly crated branch. |
|
|
||
| Tag every package that was listed in the step above: | ||
|
|
||
| tito tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here should be tito tag --user-version 1.1.hotfix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
This is handled by:
For every SPEC file make sure that
Versiontag has.hotfixat the end.
when you add it to spec file, then you can just simply tito tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird. Isn't tito tag responsible for overriding Version, though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, I used --use-version recently with a hotfix: 7975ceb
Without that, I'd expect Tito to take what's inside .tito/packages/copr-backend and auto-bump.
| tito report --untagged-commits | ||
|
|
||
| and walk the directories of packages listed. For every SPEC file make sure that `Version` tag has `.hotfix` at the end. | ||
| This ensure that the hotfix version is higher than any rebuild in Fedora. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we need to have a subsequent hotfix? We can't just bump Release, we need to do something about it in Version, e.g., hotfix.2?
No description provided.