Silently replaced an existing collection? #273

Open
opened 2026-10-02 09:29:26 +00:00 by mih · 4 comments
Owner

I ran curl -X PUT 'https://hub.trr379.de/api/dumpthings/v1/collections' with

{
  "name": "dfgsurvey-2026-main",
  "default_token": "noaccess",
  "curated": "dfgsurvey/2026/main/curated",
  "incoming": "dfgsurvey/2026/main/inboxes",
  "schema": "...",
  "backend": {"type": "sqlite"},
  "auth_sources": [...],
  "submission_tags": {}
}

Before that, I had a collection with "name": "dfg-survey-2026-main" (note the extra dash).

After the PUT this old collection is gone. I would expect a second collection with the new name to exist.

I ran `curl -X PUT 'https://hub.trr379.de/api/dumpthings/v1/collections'` with ```json { "name": "dfgsurvey-2026-main", "default_token": "noaccess", "curated": "dfgsurvey/2026/main/curated", "incoming": "dfgsurvey/2026/main/inboxes", "schema": "...", "backend": {"type": "sqlite"}, "auth_sources": [...], "submission_tags": {} } ``` Before that, I had a collection with `"name": "dfg-survey-2026-main"` (note the extra dash). After the PUT this old collection is gone. I would expect a second collection with the new name to exist.
Owner

I don't see a difference in the name.

The request uses:

"dfgsurvey-2026-main"

The before name is:

"dfgsurvey-2026-main"

AFAICS they are identical.

I don't see a difference in the name. The request uses: "dfgsurvey-2026-main" The before name is: "dfgsurvey-2026-main" AFAICS they are identical.
Author
Owner

I copied the wrong name. Now there is a difference. The question remains the same.

I copied the wrong name. Now there is a difference. The question remains the same.
Author
Owner

I have now checked server-side. There are the residuals of the dfg-survey-2026-main in the form of the directories dfg-survey/2026/main/curated, dfg-survey/2026/main/inboxes

The config_audit also shows a separate addition of a completely new collection, and later the removal of the original collection.

I have now checked server-side. There are the residuals of the `dfg-survey-2026-main` in the form of the directories `dfg-survey/2026/main/curated`, `dfg-survey/2026/main/inboxes` The `config_audit` also shows a separate addition of a completely new collection, and later the removal of the original collection.
Owner

I tried to reproduce this behavior locally with version 6.5.0 (which is what https://hub.trr379.de/api/dumpthings/v1/collections is currently running) and failed. I also tried with version 6.6.3, to no avail.

Judging from the code it seems impossible that two different names lead to overwriting. I.e., both collections should be in the configuration (can be checked with dump-things-download-config, which I cannot use since I don't have an admin token).

I have no explanation for the observed behavior.

I tried to reproduce this behavior locally with version 6.5.0 (which is what `https://hub.trr379.de/api/dumpthings/v1/collections` is currently running) and failed. I also tried with version 6.6.3, to no avail. Judging from the code it seems impossible that two different names lead to overwriting. I.e., both collections should be in the configuration (can be checked with `dump-things-download-config`, which I cannot use since I don't have an admin token). I have no explanation for the observed behavior.
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
orinoco/dump-things-service#273
No description provided.