Packit doesn't perform koji_build when only the release is bumped while using %autorelease
I wanted to bump the version of my package, but since the package uses the %autorelease the only thing to do is to create an empty commit.
However, Packit watches for the spec file changes and it didn't get any from my release bump. That results in no action from the Packit Bot.
Would it be possible to implement this into Packit?
If the %autorelease is present in the .spec file the user could add some line to the commit like: -- Perform Packit koji_build
I know I could have triggered it by just adding an empty line to the spec file but I don't like adding empty lines to my spec file, I would rather add some line to the actual commit.
I am a bit confused about why you want to add a new release with no changes. Is it to make sure that it pulls the latest BuildRequires?
How about packit build in-koji? Isn't that more suited for that kind of job?
But about build_koji is not triggered on arbitrary commits, I think you are right. By definition of %autorelease, it should always submit a new koji build when a new commit is landed in the branches regardless of what file is changed.
We have discussed via chat that the builds can still be retriggered via dist-git PR comment or via CLI locally as @LecrisUT mentions.
Can this issue be closed or do we want to discuss anything else here?
@LecrisUT Yes, it could be related to the BuildRequires, or in my case, I needed to bump the NVR so that it's bigger than the NVR in the Fedora 38 build (Otherwise the build from f38 would be used in f39, which I had to prevent from happening).
As @lbarcziova mentioned, there are other possibilities of manual triggers, which are fine with me.
I'm okay with closing.
But about
build_kojiis not triggered on arbitrary commits, I think you are right. By definition of%autorelease, it should always submit a new koji build when a new commit is landed in the branches regardless of what file is changed.
What about this :point_up:? This is unexpected behaviour
This is unexpected behaviour
What part do you consider the unexpected behaviour? (We have the behaviour of the koji builds explained in the docs)
Ok I see @ljavorsk. You have not set yourself as allowed_committers? Is that the issue? I see that there are already relevant examples here, probably they should be made more visible here.
Otherwise, just to confirm that pushing an empty commit still triggers the build if allowed_commiters is configured??
Otherwise, just to confirm that pushing an empty commit still triggers the build if allowed_commiters is configured??
No, as per the documentation, there needs to be a spec file change so that Packit reacts to a commit.
Hmm, that is an undesired behaviour when we have %autorelease. E.g. if we are changing a patch in SOURCE1, we want it to trigger a build as well. This should be specific if the spec has %autorelease of course.
On second thought... I think that Packit should trigger a build after a non-spec file change (in case %autorelease is used) because when a commit is added it "kind of" is a spec file change (it bumps the release) but not in the spec file itself.
Discussion outcome:
- We discussed using git-tags but dropped it as it would be yet-another trigger
- The consensus was to use commit message body as a trigger: if a specific string is present, perform build
- The concern is if those comments would leak in %autochangelog
TODO:
- [ ] investigate
%auto{release,changelog}: check how it works and how it generates RPM changelog- Nikola confirmed, the docs for the rpmautotool mentions this
The concern is if those comments would leak in %autochangelog
My understanding of autochangelog is that those comments will be used until a new change in changelog is detected, but I will let other more experienced packagers confirm this. It is a shame because we cannot test this on copr, only locally and on fedora afaik.
Also, I do thing this could be a positive.
We discussed using git-tags but dropped it as it would be yet-another trigger
I think it is also discouraged to use git tags on fedora. But what about file changes?
- The concern is if those comments would leak in %autochangelog
According to the documentation, only the first line of a commit message is added to the changelog, following lines are added only if they start with ... or -.
Hi, are there any updates on this issue?
Hi @ljavorsk ! Sorry, totally missed the comment. We haven't planned this issue yet, but I think we should think about the koji_build behaviour improvements in general (somehow related is also https://github.com/packit/packit-service/issues/2186) and may prioritise this.