Handling EOL CoprChroot entries¶
There are currently three cases when we schedule a CoprChroot for removal but preserve the data for some time to allow users to recover:
User disables the chroot in a project (“unclicks” the checkbox). We give them 14 days “preservation period” to reverse the decision without forcing them to rebuild everything.
Copr Admin makes a chroot EOL, e.g., fedora-38-x86_64 because the Fedora 38 version goes EOL. We keep the builds for several months, and users can extend the preservation period.
We disable rolling chroots (e.g., Fedora Rawhide or Fedora ELN) after a reasonable period of inactivity.
There are three database fields used for handling the EOL/preservation policies:
CoprChroot.deleted
(bool), CoprChroot.delete_after
(timestamp),
and MockChroot.is_active
(bool, 1:N mapped to CoprChroot
). The
following table describes certain implications behind the logic:
is_active |
delete_after |
deleted |
e-mail |
can build |
State && |
---|---|---|---|---|---|
yes |
yes |
yes |
no |
no |
|
yes |
no |
yes |
– |
no |
|
yes |
yes |
no |
yes |
yes |
|
yes |
no |
no |
– |
yes |
|
no |
yes |
yes |
no |
no |
|
no |
no |
yes |
– |
no |
|
no |
yes |
no |
yes |
no |
|
no |
no |
no |
– |
no |
|
There’s also a chroot state expired
, which is a special state of
the preserved
state. It is “still preserved”, but the time for removal is
already there, namely now() >= delete_after
.
Note that when e-mail notifications
are yes
, the time for removal has
come (now() >= delete_after
) and we were not able to send the
notification e-mail, we don’t remove the chroot data. No unexpected
removals.