Skip to content

Handle koji_build and bodhi_update retrigger from a main PR#2903

Merged
softwarefactory-project-zuul[bot] merged 1 commit into
packit:mainfrom
nforro:retriggering-main
Dec 11, 2025
Merged

Handle koji_build and bodhi_update retrigger from a main PR#2903
softwarefactory-project-zuul[bot] merged 1 commit into
packit:mainfrom
nforro:retriggering-main

Conversation

@nforro

@nforro nforro commented Dec 10, 2025

Copy link
Copy Markdown
Member

Fixes #2902.

Signed-off-by: Nikola Forró <nforro@redhat.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @nforro, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a compatibility issue where the Koji build system does not recognize 'main' as a valid branch name. By introducing logic to translate 'main' to 'rawhide' for relevant operations, it ensures that koji_build and bodhi_update retrigger events are successfully processed when originating from a 'main' branch pull request, thereby improving the reliability of these automated processes.

Highlights

  • Koji Branch Mapping: The system now correctly maps the 'main' branch to 'rawhide' when interacting with Koji for koji_build and bodhi_update retrigger events, resolving an incompatibility where Koji did not recognize 'main'.
  • Issue Resolution: This pull request fixes issue fedora-development does not include main branch #2902, which prevented koji_build and bodhi_update retrigger events from functioning correctly when initiated from a 'main' branch pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively addresses the issue of Koji not recognizing the 'main' branch by implementing a conversion to 'rawhide' in relevant handlers. This ensures that koji_build and bodhi_update retriggering functions as expected for pull requests targeting the 'main' branch.

Comment on lines +356 to +358
if (branch := self.project.get_pr(self.data.pr_id).target_branch) == "main":
# Koji doesn't recognize main, only rawhide
return "rawhide"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This logic for converting 'main' to 'rawhide' is also present in packit_service/worker/handlers/distgit.py (lines 1238-1240) and packit_service/worker/helpers/sidetag.py (lines 282-284). While functional, duplicating this specific conversion logic across multiple files can lead to inconsistencies if the rule needs to be updated in the future. Consider centralizing this conversion into a shared utility function or constant to improve maintainability and ensure a single source of truth for Koji branch naming conventions.

@softwarefactory-project-zuul

Copy link
Copy Markdown
Contributor

@majamassarini majamassarini left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏🏻

@nforro nforro added the mergeit Merge via Zuul label Dec 11, 2025
@softwarefactory-project-zuul

Copy link
Copy Markdown
Contributor

Build succeeded (gate pipeline).
https://softwarefactory-project.io/zuul/t/packit-service/buildset/dfba3cbbfad946a28c5feb57beb5c69c

✔️ pre-commit SUCCESS in 1m 42s

@softwarefactory-project-zuul
softwarefactory-project-zuul Bot merged commit 079d040 into packit:main Dec 11, 2025
5 checks passed
@github-project-automation github-project-automation Bot moved this from new to done in Packit Kanban Board Dec 11, 2025
@nforro
nforro deleted the retriggering-main branch December 11, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mergeit Merge via Zuul

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

fedora-development does not include main branch

3 participants