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

Allow Bodhi update to be created for builds triggered by any configured user #2312

Closed
1 of 2 tasks
praiskup opened this issue Jan 22, 2024 · 7 comments · Fixed by #2364
Closed
1 of 2 tasks

Allow Bodhi update to be created for builds triggered by any configured user #2312

praiskup opened this issue Jan 22, 2024 · 7 comments · Fixed by #2364
Assignees
Labels
area/fedora Related to Fedora ecosystem complexity/single-task Regular task, should be done within days. gain/high This brings a lot of value to (not strictly a lot of) users. impact/low This issue impacts only a few users. kind/feature New feature or a request for enhancement.

Comments

@praiskup
Copy link

Description

We have configured the bodhi_update job (together with commit and pull_from_upstream):
https://src.fedoraproject.org/rpms/resalloc-ibm-cloud/blob/rawhide/f/packit.yaml

I noticed that the last release (with Tito) did not trigger bodhi_update, and that's (probably)
because Packit is not the commit author, nor build submitter (I did that).

The thing is that all of this is wrapped by tito release, which itself (a) commits to Fedora git,
(b) uploads tarball into dist-git and (c) submits the Koji build (all under my name).

Typical Tito user workflow is:

  1. tito tag // produces new release
  2. git push --tags
  3. tito release // e.g. tito release fedora-all
  4. fedpkg update // a single command to generate N updates for each fedora
  5. create a release in GH -- upload tito tarball into GitHub

It is somewhat weird to stop doing step 3, and re-shuffle the old-school release work-flows.

The step 4. is though relatively inconvenient task (I need to know the NVRs) and totally async. Worth doing automatically.
Can't we again allow-list a list of FAS users that, when they submit a build, automatically create a bodhi update via packit?

Benefit

A native Tito user feeling during the release-to-Fedora scenario.

Importance

I'm not yet sure, I just promised to fill this issue. I have to get more familiar with pull-from-upstream to judge; if we can make Packit create multiple PRs (multiple fedora brnaches) with the same commit hash (so all merge events result with the same final git-sha1).

What is the impacted category (job)?

Fedora release automation

Workaround

  • There is an existing workaround that can be used until this feature is implemented.

Participation

  • I am willing to submit a pull request for this issue. (Packit team is happy to help!)
@praiskup praiskup added the kind/feature New feature or a request for enhancement. label Jan 22, 2024
@lbarcziova
Copy link
Member

hi @praiskup, thanks for this RFE.

So the request is to make Packit react (=> create Bodhi updates) for Koji builds not submitted by Packit, but submitted by someone allowed by configuration, right?

We have touched on this topic a few times already so I think it is worth confirming with the team on arch (I noticed we have already this TODO in the code :D ). From the implementation side, this should be quite simple and should not be a problem, but we would need to listen to all messages about Koji build end and not filter the packit-submitted ones.

@lbarcziova lbarcziova added the discuss discuss To be discussed within a team (usually on the so-called Architecture meeting next Thursday) label Jan 23, 2024
@praiskup praiskup changed the title Tito release breaks automatic bothi updates Tito release breaks automatic Bodhi updates Jan 30, 2024
@lbarcziova lbarcziova moved this from new to priority-backlog in Packit Kanban Board Feb 8, 2024
@lbarcziova lbarcziova added area/fedora Related to Fedora ecosystem impact/low This issue impacts only a few users. gain/high This brings a lot of value to (not strictly a lot of) users. complexity/single-task Regular task, should be done within days. and removed discuss discuss To be discussed within a team (usually on the so-called Architecture meeting next Thursday) labels Feb 8, 2024
@lachmanfrantisek lachmanfrantisek changed the title Tito release breaks automatic Bodhi updates Allow Bodhi update to be created for builds triggered by any configured user Feb 27, 2024
@majamassarini majamassarini moved this from priority-backlog to refined in Packit Kanban Board Feb 29, 2024
@lbarcziova lbarcziova self-assigned this Mar 6, 2024
@lbarcziova lbarcziova moved this from refined to in-progress in Packit Kanban Board Mar 6, 2024
@lbarcziova
Copy link
Member

lbarcziova commented Mar 6, 2024

@packit/the-packit-team regarding the naming of the config option for this, we already have allowed_pr_authors and allowed_committers that are checked for dist-git pushes, so I would go with something like

  • allowed_(koji_)build_submitters
  • allowed_(koji_)build_owners
  • allowed_builders

WDYT? Feel free to comment other suggestions.

(EDIT: for context, Koji shows Built by for build, Owner for task and the fedmsg messages have this info as owner)

@mfocko
Copy link
Member

mfocko commented Mar 6, 2024

Looking at the Koji webpage, it says built by, so I'm voting for allowed_builders to keep it as similar as possible.

@xsuchy
Copy link
Contributor

xsuchy commented Mar 6, 2024

I will add another one :) allowed_to_trigger_build - long, but descriptive.

@lbarcziova
Copy link
Member

@xsuchy since this is actually about triggering Bodhi updates, I guess allowed_to_trigger_updates would probably make better sense, WDYT?

@lbarcziova
Copy link
Member

lbarcziova commented Mar 6, 2024

thinking about it more, there are 2 ways of triggering a build:

  1. successful Koji build
  2. by /packit create-update comment

I initially understood this new configuration option should influence only the 1. and in that case, the allowed_to_trigger_updates might be confusing

OR we could consider this option for both ways of triggering and in that case this name would make sense - but this would be IMO again inconsistent with how we have it for koji builds

@praiskup
Copy link
Author

praiskup commented Mar 7, 2024

I was very confused today, sorry. I don't mind that much. But since you asked my opinion, here are some suggestions:

{fedora|bodhi}_update_if_built_by = []
bodhi_if_built_by = []
bodhi_builders = [] # this would give it some attention :D

softwarefactory-project-zuul bot added a commit to packit/packit that referenced this issue Mar 7, 2024
Add allowed_builders to configuration schema

Needed for packit/packit-service#2312
RELEASE NOTES BEGIN
N/A
RELEASE NOTES END

Reviewed-by: Laura Barcziová
Reviewed-by: František Lachman <[email protected]>
lbarcziova added a commit to lbarcziova/packit-service that referenced this issue Mar 7, 2024
@lbarcziova lbarcziova moved this from in-progress to in-review in Packit Kanban Board Mar 7, 2024
softwarefactory-project-zuul bot added a commit that referenced this issue Mar 8, 2024
Check allowed_builders for Bodhi updates triggered by builds

Fixes #2312
RELEASE NOTES BEGIN
You can now configure a list of Fedora accounts of users whose successful Koji builds will trigger automatic Bodhi updates (by default only packit).
RELEASE NOTES END

Reviewed-by: Maja Massarini
Reviewed-by: František Lachman <[email protected]>
@github-project-automation github-project-automation bot moved this from in-review to done in Packit Kanban Board Mar 8, 2024
softwarefactory-project-zuul bot added a commit to packit/packit-service-fedmsg that referenced this issue Mar 8, 2024
Do not check owner for Koji non-scratch builds

Needed for packit/packit-service#2312
RELEASE NOTES BEGIN
N/A
RELEASE NOTES END

Reviewed-by: František Lachman <[email protected]>
Reviewed-by: Maja Massarini
softwarefactory-project-zuul bot added a commit that referenced this issue Mar 11, 2024
Support dist-git account aliases for Bodhi's allowed_builders

Related to #2312
RELEASE NOTES BEGIN
N/A
RELEASE NOTES END

Reviewed-by: František Lachman <[email protected]>
Reviewed-by: Maja Massarini
lbarcziova added a commit to lbarcziova/packit.dev that referenced this issue Mar 11, 2024
lbarcziova added a commit to lbarcziova/packit.dev that referenced this issue Mar 12, 2024
softwarefactory-project-zuul bot added a commit to packit/packit.dev that referenced this issue Mar 12, 2024
Document allowed_builders for Bodhi update job

Related to packit/packit-service#2312

Reviewed-by: František Lachman <[email protected]>
Reviewed-by: Nikola Forró
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/high This brings a lot of value to (not strictly a lot of) users. impact/low This issue impacts only a few users. kind/feature New feature or a request for enhancement.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants