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 chroot deletion in Pulp #3312

Merged
merged 3 commits into from
Jul 1, 2024

Conversation

FrostyX
Copy link
Member

@FrostyX FrostyX commented Jun 24, 2024

Fix #3306

ownername = ext_data["ownername"]
projectname = ext_data["projectname"]
chrootname = ext_data["chrootname"]
storage = storage_for_enum(ext_data["storage"], self.opts, self.log)
Copy link
Member

Choose a reason for hiding this comment

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

This reminds me the note from previous PR, that having something like:

storage = CoprResultStorage(ext_data["ownername"], ext_data["project_name"])
storage.delete_repository(ext_data["dirname"])

Would be much more convenient. Maybe even:

storage = copr.get_storage()

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated, PTAL

FrostyX added 2 commits June 25, 2024 10:45
This isn't necessary and we could get by with `storage_for_job` but I
think this is a good first step towards decoupling storage from jobs,
as we discoused a couple of times already.
@FrostyX FrostyX force-pushed the pulp-disabling-chroots branch from b810e0f to 6ffb365 Compare June 25, 2024 09:27
@FrostyX FrostyX force-pushed the pulp-disabling-chroots branch from 6ffb365 to 01a9bcc Compare June 25, 2024 09:32
@FrostyX
Copy link
Member Author

FrostyX commented Jun 25, 2024

Oops, some failing tests

@FrostyX FrostyX force-pushed the pulp-disabling-chroots branch from 01a9bcc to 9e09c77 Compare June 25, 2024 13:05
self.destdir = self.opts.destdir
self.front_url = self.opts.frontend_base_url
self.results_root_url = self.opts.results_baseurl

self.log = log if log else get_redis_logger(self.opts, "backend.actions", "actions")

storage_enum = StorageEnum.backend
if isinstance(self.ext_data, dict) and "storage" in self.ext_data:
storage_enum = self.ext_data.get("storage")
Copy link
Member

Choose a reason for hiding this comment

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

Ah, we are on backend - not frontend :-( so we do not have the models.Action object in hand...

@praiskup praiskup merged commit 05b7ce6 into fedora-copr:main Jul 1, 2024
6 of 8 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.

Pulp - enable/disable chroots
2 participants