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

Delete generated jobsets that are no longer tracked/generated by .jobsets #1326

Open
basile-henry opened this issue Dec 12, 2023 · 0 comments

Comments

@basile-henry
Copy link

Is your feature request related to a problem? Please describe.
We have a setup where we generate jobsets for each PR. When a PR is closed/merged, the associated jobset is no longer generated by .jobsets so it is disabled and set to hidden automatically by hydra:

$project->jobsets->search({ name => { "not in" => \@kept } })->update({ enabled => 0, hidden => 1 });

The issue is that it prevents hydra from garbage collecting any associated build products. This went unnoticed for us for years and is holding on to terabytes worth of useless build products 😅

Describe the solution you'd like
I understand that deleting jobsets (even disabled/hidden ones) can be problematic (see #1006 and #963).
So as an intermediate solution, until these other issues are resolved, I would like to still be able to delete it manually (curl -X DELETE) with the jobset_DELETE endpoint. At the moment no generated jobsets can be deleted:

if (length($c->stash->{project}->declfile)) {
error($c, "can't modify jobset of declarative project", 403);
}

Maybe this check could be loosened to allow deleting jobsets that are already disabled and hidden anyway? Or is there some other reason for disallowing modifying generated jobsets I have not considered?

Describe alternatives you've considered
Buying more HDDs 😅

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

No branches or pull requests

1 participant