Skip to content

Add RHEL dist-git hostname to distgit detector#461

Merged
antbob merged 1 commit into
packit:mainfrom
antbob:dist_git_detect
May 11, 2026
Merged

Add RHEL dist-git hostname to distgit detector#461
antbob merged 1 commit into
packit:mainfrom
antbob:dist_git_detect

Conversation

@antbob
Copy link
Copy Markdown
Collaborator

@antbob antbob commented May 7, 2026

This literally just adds RHEL dist-git hostname to detect_distgit_source tool to recognize it as dist-git source. The backport agent depends on this to follow the dist-git workflow which it fails to do otherwise. We've found this scenario plays out when RHEL dist-git patch or commit is explicitly added in Jira comments as the source of the patch to backport.

Copy link
Copy Markdown
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 adds support for identifying RHEL dist-git sources by checking for the 'pkgs.devel.redhat.com' hostname in the dist-git detector. The review feedback highlights a security concern regarding the use of partial string matching for hostname validation, which could be exploited, and recommends using an exact equality check instead. Additionally, the reviewer requested the inclusion of unit tests to verify the new detection logic and prevent regressions.

Comment thread ymir/tools/unprivileged/distgit_detector.py Outdated
Comment thread ymir/tools/unprivileged/distgit_detector.py Outdated
majamassarini
majamassarini previously approved these changes May 8, 2026
@antbob
Copy link
Copy Markdown
Collaborator Author

antbob commented May 11, 2026

@majamassarini please have another look. this should do it i think.

Copy link
Copy Markdown
Member

@majamassarini majamassarini left a comment

Choose a reason for hiding this comment

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

Thanks!

@antbob antbob merged commit b1b963b into packit:main May 11, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants