Skip to content

copr.repository provider creates a Repository object#4695

Open
AthreyVinay wants to merge 1 commit intomainfrom
avinay-copr-repo-enumerate
Open

copr.repository provider creates a Repository object#4695
AthreyVinay wants to merge 1 commit intomainfrom
avinay-copr-repo-enumerate

Conversation

@AthreyVinay
Copy link
Contributor

Resolves #4692

@AthreyVinay AthreyVinay added this to the 1.70 milestone Mar 13, 2026
@AthreyVinay AthreyVinay added step | prepare Stuff related to the prepare step plugin | artifact Related to the `prepare/artifact` plugin. labels Mar 13, 2026
@github-project-automation github-project-automation bot moved this to backlog in planning Mar 13, 2026
@AthreyVinay AthreyVinay moved this from backlog to review in planning Mar 13, 2026
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 refactors the copr.repository provider to create a Repository object. It introduces a CoprArtifactProvider base class for shared Copr logic. My feedback focuses on improving exception handling and attribute initialization for better robustness.

Comment on lines -289 to +312
# Parse the copr repo name
matched = COPR_REPO_PATTERN.match(copr)
if not matched:
raise PrepareError(f"Invalid copr repository '{copr}'.")
group, name, project = matched.groups()
group = 'group_' if group else ''
# Prepare the repo file url
parts = [COPR_URL] + (['g'] if group else [])
parts += [name, project, 'repo', 'epel-6']
parts += [f"{group}{name}-{project}-epel-6.repo"]
url = '/'.join(parts)
url = build_copr_repo_url(copr, 'epel-6')
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still support this? Copr repos in https://copr.fedorainfracloud.org/coprs do not have epel-6 chroot anymore. @psss @happz @thrix? Could probably still be accessed on internal copr, but at that point the hard-coded url would still get in the way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice one - havent seen epel-6 there.

@AthreyVinay AthreyVinay added the ci | full test Pull request is ready for the full test execution label Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci | full test Pull request is ready for the full test execution plugin | artifact Related to the `prepare/artifact` plugin. step | prepare Stuff related to the prepare step

Projects

Status: review

Development

Successfully merging this pull request may close these issues.

copr.repository provider should enumerate packages into artifacts.yaml

2 participants