[6.19.z] Use Convert2RHEL repofiles instead of deprecated repos for tests - #20890
Merged
Gauravtalreja1 merged 1 commit intoFeb 26, 2026
Merged
Conversation
) Signed-off-by: Gaurav Talreja <gtalreja@redhat.com> (cherry picked from commit 0644d11)
Collaborator
Author
|
Contributor
Reviewer's GuideIntroduce a helper to derive repository base URLs from remote .repo files and update Convert2RHEL CentOS/Oracle API tests to use this helper and new repofile-based settings instead of deprecated direct repository URLs. Sequence diagram for get_baseurl_by_repofile usage in Convert2RHEL API testssequenceDiagram
actor Tester
participant TestConvert2RHEL
participant content_info
participant requests
participant RepoServer
Tester->>TestConvert2RHEL: run API test
TestConvert2RHEL->>content_info: get_baseurl_by_repofile(repo_url, verify_ssl)
content_info->>requests: get(repo_url, verify=verify_ssl, timeout=10)
requests->>RepoServer: HTTP GET repo_url
RepoServer-->>requests: 200 OK, .repo file
requests-->>content_info: Response(text)
content_info->>content_info: parse lines for baseurl=
alt baseurl found
content_info-->>TestConvert2RHEL: baseurl string
TestConvert2RHEL->>TestConvert2RHEL: use baseurl in Convert2RHEL repo config
else baseurl not found
content_info-->>TestConvert2RHEL: raise ValueError
end
opt HTTP error
requests-->>content_info: raise HTTPError
content_info-->>TestConvert2RHEL: propagate HTTPError
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
get_baseurl_by_repofile, consider skipping commented lines and using a more robust parser (e.g.,configparserfor INI-style files) so you don’t accidentally pick upbaseurlin comments or miss values in specific sections. - The hardcoded timeout value in
get_baseurl_by_repofilemakes it harder to tune behavior for different environments; consider exposing it as a parameter or a module-level constant.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `get_baseurl_by_repofile`, consider skipping commented lines and using a more robust parser (e.g., `configparser` for INI-style files) so you don’t accidentally pick up `baseurl` in comments or miss values in specific sections.
- The hardcoded timeout value in `get_baseurl_by_repofile` makes it harder to tune behavior for different environments; consider exposing it as a parameter or a module-level constant.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Collaborator
Author
|
PRT Result |
Gauravtalreja1
approved these changes
Feb 26, 2026
Gauravtalreja1
deleted the
cherry-pick-6.19.z-0644d11f807200c8014d37d1ac667fccd0952529
branch
February 26, 2026 14:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherrypick of PR: #20869
Problem Statement
Solution
Related Issues
Summary by Sourcery
Switch tests to use Convert2RHEL .repo files to derive repository base URLs instead of hard-coded deprecated repository URLs.
New Features:
Enhancements: