delete_expired fails to expire real workspaces
As a followup to the investigation performed in #891 (closed), we have encountered yet another failure scenario in debusine-admin delete_expired
on debusine.debian.net:
Jun 02 00:00:07 poseidon systemd[1]: Starting debusine-server-delete-expired.service - Daily cleanup of Debusine expired or unused objects...
Jun 02 00:00:08 poseidon debusine-admin[1337229]: System check identified no issues (0 silenced).
Jun 02 00:00:52 poseidon debusine-admin[1337237]: CommandError: Database error: ("Cannot delete some instances of model 'WorkRequest' because they are referenced through protected foreign keys: 'CollectionItem.created_by_workflow', 'CollectionItem.removed_by_workflow'.", {<CollectionItem: Id: 1725184 Name: offpunk_2.7.1-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725185 Name: parsero_0.0+git20140929.e5b585a-7|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725186 Name: sphinx-tabs_3.4.7-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725187 Name: pyhamtools_0.11.0-2|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725188 Name: python-mechanicalsoup_1.3.0-2|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725189 Name: sphinx-toolbox_3.9.0-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725190 Name: archmage_1:0.4.2.1-3|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725191 Name: python-readtime_3.0.0-2|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725192 Name: gnome-feeds_2.2.0-5|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725193 Name: buku_4.9+ds-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725194 Name: litestar_2.16.0-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725195 Name: python-autodocsumm_0.2.14-2|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725196 Name: astroquery_0.4.7+dfsg-3|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725197 Name: pandas_2.2.3+dfsg-9|autopkgtest-arm64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725198 Name: pandas_2.2.3+dfsg-9|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725199 Name: hyperkitty_1.3.12-3|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725200 Name: exhale_0.3.7-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725201 Name: nbconvert_7.16.6-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725202 Name: myst-parser_4.0.1-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725203 Name: mkdocs-material-extensions_1.3.1-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725204 Name: calibre_8.4.0+ds-1|autopkgtest-arm64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725205 Name: calibre_8.4.0+ds-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725206 Name: python-pypartpicker_1.9.5-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725207 Name: soupsieve_2.7-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725208 Name: ariba_2.14.7+ds-7|autopkgtest-arm64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725209 Name: ariba_2.14.7+ds-7|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725210 Name: python-duckpy_3.2.0-3|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725211 Name: pydoctor_24.11.2-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725212 Name: slidge-matridge_0.2.3-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725213 Name: Worker:sbuild:beautifulsoup4:all%3Aamd64%3Aamd64:96334 Parent collection id: 141 Child type: b>, <CollectionItem: Id: 1725214 Name: debian_sid_amd64_beautifulsoup4_4.13.4-1_96334 Parent collection id: 140 Child type: b>, <CollectionItem: Id: 1725215 Name: Worker:sbuild:beautifulsoup4:all%3Aamd64%3Aamd64:96452 Parent collection id: 141 Child type: b>, <CollectionItem: Id: 1708063 Name: Worker:sbuild:beautifulsoup4:all%3Aamd64%3Aamd64:93757 Parent collection id: 141 Child type: b>, <CollectionItem: Id: 1707903 Name: Worker:sbuild:beautifulsoup4:all%3Aamd64%3Aamd64:93752 Parent collection id: 141 Child type: b>, <CollectionItem: Id: 1725154 Name: build-all Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725155 Name: autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725156 Name: geneagrapher-core_0.1.3-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725157 Name: mkdocstrings-python-handlers_1.16.10-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725158 Name: beets_2.2.0-3|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725159 Name: sphinxext-opengraph_0.7.5-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725160 Name: openlp_3.1.7+ds-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725161 Name: dirsearch_0.4.3-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725162 Name: giara_1.1.0-0.1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725163 Name: plastex_3.1-2|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725164 Name: pyfavicon_0.1.1+dfsg1-5|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725165 Name: python-ofxclient_2.0.4-7|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725166 Name: debmutate_0.73|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725167 Name: mkdocs-test_0.5.3-5|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725168 Name: lexicon_3.17.0-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725169 Name: translate-toolkit_3.15.1-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725170 Name: sphinx-remove-toctrees_1.0.0-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725171 Name: python-ulmo_0.8.8+dfsg1-8|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725172 Name: keyman_18.0.236-1|autopkgtest-arm64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725173 Name: keyman_18.0.236-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725174 Name: numpydoc_1.8.0-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725175 Name: python-scooby_0.10.0-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725176 Name: sunpy_6.1.1-1|autopkgtest-arm64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725177 Name: sunpy_6.1.1-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725178 Name: postorius_1.3.13-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725179 Name: python-sphinx-codeautolink_0.16.2-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725180 Name: pydata-sphinx-theme_0.16.1+dfsg-3|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725181 Name: python-fedora_1.1.1-5|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725182 Name: python-aiovodafone_0.9.0-1.1|autopkgtest-amd64 Parent collection id: 345 Child type: b>, <CollectionItem: Id: 1725183 Name: libpysal_4.12.1-1|autopkgtest-amd64 Parent collection id: 345 Child type: b>})
Jun 02 00:00:52 poseidon systemd[1]: debusine-server-delete-expired.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
Jun 02 00:00:52 poseidon systemd[1]: debusine-server-delete-expired.service: Failed with result 'exit-code'.
This seems to refer to work requests inside this (aborted) workflow:
- Workflow: https://debusine.debian.net/debian/developers-demo/work-request/96332
- Internal collection: https://debusine.debian.net/debian/developers-demo/collection/debusine:workflow-internal/workflow-96332/
But in fact, this is the first time that we try to remove a real experiment workspace since the workspace was marked to expire on May 28th: https://debusine.debian.net/debian/developers-demo/
/cc @stefanor because it's his workspace /cc @enrico because he wrote the workspace expiry code IIRC /cc @cjwatson because he was working on the various fixes to delete-expired recently
This was seen while running version 0.11.2.dev227+g265d6424.
Edited by Raphaël Hertzog