Skip to content

Implement dist-git onboarding#3013

Open
nforro wants to merge 3 commits intopackit:mainfrom
nforro:onboarding
Open

Implement dist-git onboarding#3013
nforro wants to merge 3 commits intopackit:mainfrom
nforro:onboarding

Conversation

@nforro
Copy link
Member

@nforro nforro commented Feb 19, 2026

Related to #2506.

Copy link
Contributor

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

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 introduces a new dist-git onboarding feature, which is a valuable addition. The implementation is well-structured, touching upon the API, event handling, and worker tasks as necessary. The code generally follows the existing patterns and conventions of the project. I have a couple of suggestions to improve robustness and code clarity.

@centosinfra-prod-github-app

This comment was marked as outdated.

Signed-off-by: Nikola Forró <nforro@redhat.com>
Signed-off-by: Nikola Forró <nforro@redhat.com>
@centosinfra-prod-github-app

This comment was marked as outdated.

Signed-off-by: Nikola Forró <nforro@redhat.com>
@nforro
Copy link
Member Author

nforro commented Feb 24, 2026

/gemini review

Copy link
Contributor

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

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 introduces a new feature for onboarding packages in dist-git. The implementation includes a new API endpoint, a Celery task, and corresponding event handlers and parsers. The code is well-structured and follows the existing design patterns of the service. The addition of an integration test is also a great practice.

I've identified a security concern regarding secret token comparison and a minor style guide violation. My detailed feedback is in the review comments.

@centosinfra-prod-github-app
Copy link
Contributor

@nforro nforro moved this from New to In review in Packit pull requests Feb 24, 2026
@nforro
Copy link
Member Author

nforro commented Feb 24, 2026

Here is an example PR: https://src.fedoraproject.org/rpms/scipy/pull-request/58

Copy link
Member

@lbarcziova lbarcziova left a comment

Choose a reason for hiding this comment

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

this is neat!

just few comments

initializer.package_config_dict | {"downstream_package_name": package},
)

self.perform_onboarding(
Copy link
Member

Choose a reason for hiding this comment

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

do we need some exception handling here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure... it should be retried automatically on common exceptions, but perhaps it would be better to be explicit about it.

* [`koji_build`](https://packit.dev/docs/configuration/downstream/koji_build):
Submit a Koji build as reaction to a merged pull request.
* [`bodhi_update`](https://packit.dev/docs/configuration/downstream/bodhi_update):
Create a Bodhi update as a reaction to a succesful Koji build.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Create a Bodhi update as a reaction to a succesful Koji build.
Create a Bodhi update as a reaction to a successful Koji build.

should be run for.

You can also further tweak the process. A few handy options are prepared for you
in the confguration file to uncomment. Rest can be found in
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
in the confguration file to uncomment. Rest can be found in
in the configuration file to uncomment. Rest can be found in

Comment on lines +376 to +377
[how to configure multi-package updates]
(https://packit.dev/docs/fedora-releases-guide/releasing-multiple-packages).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[how to configure multi-package updates]
(https://packit.dev/docs/fedora-releases-guide/releasing-multiple-packages).
[how to configure multi-package updates](https://packit.dev/docs/fedora-releases-guide/releasing-multiple-packages).

Comment on lines +387 to +388
* Be aware that there are other packages and packagers and that you might break someone else's work
by using Packit in a wrong way. (E.g. be careful about dependent packages since there is
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* Be aware that there are other packages and packagers and that you might break someone else's work
by using Packit in a wrong way. (E.g. be careful about dependent packages since there is
* Be aware that there are other packages and packagers and automated updates by using Packit may affect them.
(E.g. be careful about dependent packages since there is

I would just use a bit milder tone here.

Comment on lines +400 to +401
In case you don't want to receive these pull-requests in the future, you can use
the `--onboard-packit no` option when running `fedpkg request-repo`.
Copy link
Member

Choose a reason for hiding this comment

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

maybe we could also mention that they can easily disable packit by either removing particular jobs or the file itself (emphasis on rawhide branch)

the `--onboard-packit no` option when running `fedpkg request-repo`.


I hope you will be happy with the automation!
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
I hope you will be happy with the automation!
We hope you will be happy with the automation!

path_or_url="",
upstream_git_url=None,
)
self.package_config = self.job_config = PackageConfig.get_from_dict(
Copy link
Member

Choose a reason for hiding this comment

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

do we actually need these?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants