Datasets: a deleted Dataset's name is held while scenario bundles cite it
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
First check the blocking issue #2624 before starting. Read the Dataset delete path in the dataedit service and the name preview endpoint, plus oekg/graph_store.py for the ASK check; use the existing repair_oekg_shape_violations manage.py command as the template for drop_dead_dataset_links. Done means the acceptance criteria pass: hold written or not by citation state, held-name refusal without graph queries (assertNumQueries), dry-run vs --apply, migration dataedit.0059_datasetnamehold, and tests via Django's test client, call_command, and OekgGraphTestCase against real Fuseki.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Parent
#2613 (spec: Profile dashboard datasets tab and the Dataset lifecycle)
What to build
A deleted Dataset's name stays free unless a scenario bundle cites it. While it is cited, the name is held, so nobody else's Dataset silently becomes the target of the citation. An operator command releases held names after 30 days.
DatasetNameHold: the name (primary key) anddeleted_at. Only a Dataset delete writes one; only the cleanup command removes one.- At delete, the service asks the graph store in one
ASKwhether anyref: datasetlink cites the name. It goes through the OEKG API's own client (oekg/graph_store.py), neverfactsheet/oekg/connection.py, which parses the OEO at import.- Not cited: the name is free at once.
- Cited, or the store unreachable: a hold is written in the same transaction.
- A delete never fails on the graph store.
- While a hold exists, the service's
createand the name preview refuse the name: "used by a deleted dataset that scenario bundles still cite; it becomes available once those links are gone." Both read the hold table, never the graph store. The preview gains its "held" state. manage.py drop_dead_dataset_links, shaped likerepair_oekg_shape_violations:- dry run by default,
--applyto act,--older-than-daysdefaulting to 30; - for every older hold it removes each
ref: datasetlink to the name, one atomic update with a version bump per bundle, then deletes the hold; - its JSON record is written before the graph is touched, and it logs one line per link;
- it writes no OEKG history entry;
- an operator runs it on the host; there is no scheduler.
- dry run by default,
- On the record: this is a deliberate, interim departure from two closed OEKG API decisions, never collect (Dataset links) and every write records (history). Say so in the command's docstring. The full fix is out of scope.
- Until the command runs, a link to a deleted Dataset reads
resolvable: false, as today.
Acceptance criteria
- Delete with a citing link writes a hold; with no link it writes none and the name is free at once; with the store unreachable it writes a hold and the delete still succeeds
- Create (dashboard and API) and the preview refuse a held name with the sentence above, without asking the graph store (
assertNumQueries/ no graph call) - The command's dry run changes nothing and lists what it would do;
--applyremoves every link to the name in one atomic update per bundle with a version bump, deletes the hold, and frees the name; holds younger than the threshold are left alone - An unwritable record path stops the run before the graph is touched
- The graph parts run against a real Fuseki on
OekgGraphTestCase(one named graph per test) and skip cleanly, with a reason, without one - If the selection ticket has merged, its delete ceiling is re-checked with the real
ASK, and the result is stated in the PR -
CONTEXT.md's Dataset link entry ("is never cleaned up") is amended (an untracked file: edit it locally and say so in the PR) - Tested through the spec's seams: HTTP through Django's test client for delete, create and the preview;
call_commandfor the command
Migrations and deploy
- Django migration
dataedit.0059_datasetnamehold(number as expected today; take the next free one): one new table, nothing backfilled. - Deploy step:
python manage.py migrate, in the next release's deploy checklist. The command is not a deploy step: an operator runs it on the host when holds are older than 30 days. Note it in the checklist as an operator tool.
Blocked by
- #2624
🤖 Generated with Claude Code
- Lingua principale
- Python
- Stelle
- 65
- Fork
- 28
- Merge medio
- 4g 7h
- PR unite (30g)
- 25
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenEnergyPlatform/oeplatform
-
API bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenEnergyPlatform/oeplatform#2580 ·
I maintainer di solito rispondono entro 3 giorni
-
Redesign the database page to support dataset creationForse già presa @bmlancien l’ha presa 4 giorni fa. Apertadata-upload
OpenEnergyPlatform/oeplatform#2762 · 1 commento · 3 assegnatari ·
I maintainer di solito rispondono entro 3 giorni
-
Improve navigation links in Core Features and Integrated WorkflowsForse già presa @tomi-rli l’ha presa 19 giorni fa. ApertaHomepage
OpenEnergyPlatform/oeplatform#2746 · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
Enhance the new OEP homepageForse già presa @jh-RLI l’ha presa 19 giorni fa. ApertaHomepage
OpenEnergyPlatform/oeplatform#2745 · 2 assegnatari ·
I maintainer di solito rispondono entro 3 giorni
-
Display child nodes in the OEO Viewer Graph ViewForse già presa @jh-RLI l’ha presa 23 giorni fa. Apertaoeo viewer
OpenEnergyPlatform/oeplatform#2739 · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di OpenEnergyPlatform/oeplatform
Issue simili
-
needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
flashinfer-ai/flashinfer#9803 ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
oscarbol09/thesisforge#61 ·
-
api bug performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
oscarbol09/audiobard#159 ·
-
area:web p2 product:business triage:active type:bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
cuadrao-ai/argus#2328 ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
nikhilb2/simple_invoicing#907 ·