Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a check for every storage whether a repository is available #3527

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

FrostyX
Copy link
Member

@FrostyX FrostyX commented Nov 22, 2024

Otherwise, builds in Pulp projects will fail with this:

Waiting for copr_base repository
Waiting for copr_base repository
Backend process error: Giving up waiting for copr_base repository

So far it worked only because we didn't create Pulp projects directly but rather migrated existing projects into Pulp and therefore this path existed on the backend.

@FrostyX FrostyX added the pulp label Nov 22, 2024
@@ -172,6 +180,11 @@ def delete_builds(self, dirname, chroot_builddirs, build_ids):
self.log.debug("can't remove %s", log_path)
return result

def repository_exists(self, chroot):
repodata = os.path.join(self.opts.destdir, self.owner, self.project,
Copy link
Member

Choose a reason for hiding this comment

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

Is self.project actually a self.coprdir?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's actually this:

project = self.ext_data.get("projectname")

which comes from frontend

project = self.ext_data.get("projectname")

so it should only be a project name, not CoprDir name. Which should IMHO be what we want because CoprDirs don't have their own repositories available (see #3369) and they use the main repo.

Copy link
Member

Choose a reason for hiding this comment

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

Separate CoprDirs have their own repositories, and they should be created before build. We previously used self.chroot_dir, see #3571 how the variable looks like.

I believe we are changing the semantics now 🤷

It is truth that we do not necessarily need the CoprDir's metadata, because these are not used at build-time, but that is probably a "temporary" issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

Just to confirm that you are right. Previously, we were checking if this exists

/var/lib/copr/public_html/results/frostyx/test-pulp-devel-7:custom:foo/fedora-rawhide-x86_64/repodata/repomd.xml

and we check

/var/lib/copr/public_html/results/frostyx/test-pulp-devel-7/fedora-rawhide-x86_64/repodata/repomd.xml

I will fix it, so we don't change the behavior.

It is truth that we do not necessarily need the CoprDir's metadata, because these are not used at build-time, but that is probably a "temporary" issue.

This is the root of the problem. I didn't treat it as a "temporary issue" but rather "this is how it is". But I agree with you, we eventually want to get this fixed.

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 hope I addressed the issue correctly. PTAL.
There is also one more commit fixing semi-related issue.

@nikromen nikromen self-requested a review December 16, 2024 11:41
@nikromen nikromen self-assigned this Dec 16, 2024
praiskup added a commit to praiskup/copr that referenced this pull request Jan 6, 2025
praiskup added a commit that referenced this pull request Jan 6, 2025
…available

Otherwise, builds in Pulp projects will fail with this:

    Waiting for copr_base repository
    Waiting for copr_base repository
    Backend process error: Giving up waiting for copr_base repository

So far it worked only because we didn't create Pulp projects directly
but rather migrated existing projects into Pulp and therefore this
path existed on the backend.
This method is called when backend receives a createrepo action. As you can see,
the `dirname` parameter was unused. Which worked fine when the createrepo action
was generated when creating a new project or when manually clicking the
"Regenerate" button in a project overview. However, createrepo action is also
emitted when somebody submits a build into a CoprDir and thereby creates it.
Copy link
Member

@praiskup praiskup left a comment

Choose a reason for hiding this comment

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

Thank you!

@praiskup praiskup merged commit e9f566f into fedora-copr:main Jan 9, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants