-
Notifications
You must be signed in to change notification settings - Fork 63
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
Conversation
backend/copr_backend/actions.py
Outdated
ownername = ext_data["ownername"] | ||
projectname = ext_data["projectname"] | ||
chrootname = ext_data["chrootname"] | ||
storage = storage_for_enum(ext_data["storage"], self.opts, self.log) |
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, PTAL
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.
b810e0f
to
6ffb365
Compare
6ffb365
to
01a9bcc
Compare
Oops, some failing tests |
01a9bcc
to
9e09c77
Compare
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") |
There was a problem hiding this comment.
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...
Fix #3306