Skip to content
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

Packit doesn't perform koji_build when only the release is bumped while using %autorelease #1918

Open
ljavorsk opened this issue Apr 5, 2023 · 14 comments
Labels
area/fedora Related to Fedora ecosystem complexity/single-task Regular task, should be done within days. gain/low This doesn't bring that much value to users. impact/low This issue impacts only a few users. kind/bug Something isn't working. workaround-exists There is an existing workaround that can be used in the meantime of implementing the issue.

Comments

@ljavorsk
Copy link

ljavorsk commented Apr 5, 2023

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.

@LecrisUT
Copy link
Contributor

LecrisUT commented Apr 6, 2023

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.

@lbarcziova lbarcziova self-assigned this Apr 6, 2023
@lbarcziova
Copy link
Member

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?

@ljavorsk
Copy link
Author

ljavorsk commented Apr 6, 2023

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

@LecrisUT
Copy link
Contributor

LecrisUT commented Apr 6, 2023

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.

What about this ☝️? This is unexpected behaviour

@lbarcziova
Copy link
Member

This is unexpected behaviour

What part do you consider the unexpected behaviour? (We have the behaviour of the koji builds explained in the docs)

@LecrisUT
Copy link
Contributor

LecrisUT commented Apr 6, 2023

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??

@lbarcziova
Copy link
Member

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.

@LecrisUT
Copy link
Contributor

LecrisUT commented Apr 6, 2023

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.

@ljavorsk
Copy link
Author

ljavorsk commented Apr 7, 2023

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.

@lbarcziova lbarcziova added the discuss discuss To be discussed within a team (usually on the so-called Architecture meeting next Thursday) label Apr 11, 2023
@TomasTomecek
Copy link
Member

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

@TomasTomecek TomasTomecek removed the discuss discuss To be discussed within a team (usually on the so-called Architecture meeting next Thursday) label Apr 13, 2023
@LecrisUT
Copy link
Contributor

LecrisUT commented Apr 13, 2023

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?

@nforro
Copy link
Member

nforro commented Apr 13, 2023

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

@TomasTomecek TomasTomecek added kind/bug Something isn't working. area/fedora Related to Fedora ecosystem complexity/single-task Regular task, should be done within days. gain/low This doesn't bring that much value to users. impact/low This issue impacts only a few users. workaround-exists There is an existing workaround that can be used in the meantime of implementing the issue. labels Apr 13, 2023
@TomasTomecek TomasTomecek moved this from new to backlog in Packit Kanban Board Apr 13, 2023
@lbarcziova lbarcziova removed their assignment Apr 13, 2023
@ljavorsk
Copy link
Author

ljavorsk commented Jul 25, 2023

Hi, are there any updates on this issue?

@lbarcziova
Copy link
Member

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 packit/packit-service#2186) and may prioritise this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fedora Related to Fedora ecosystem complexity/single-task Regular task, should be done within days. gain/low This doesn't bring that much value to users. impact/low This issue impacts only a few users. kind/bug Something isn't working. workaround-exists There is an existing workaround that can be used in the meantime of implementing the issue.
Projects
Status: backlog
Development

No branches or pull requests

5 participants