Skip to content

Inconsistent behaviour of dataset delete API - #12332

Open
stevenwinship wants to merge 8 commits into
developfrom
11253-inconsistent-dataset-delete-api
Open

Inconsistent behaviour of dataset delete API#12332
stevenwinship wants to merge 8 commits into
developfrom
11253-inconsistent-dataset-delete-api

Conversation

@stevenwinship

Copy link
Copy Markdown
Contributor

What this PR does / why we need it: API call of delete Dataset does not match what has been documented. Superuser must use /destroy to delete a released Dataset. Delete Dataset API should only work for "Draft" datasets.

Which issue(s) this PR closes: #11253

Special notes for your reviewer:

Suggestions on how to test this:

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?: Included

Additional documentation:

@stevenwinship stevenwinship self-assigned this Apr 15, 2026
@stevenwinship stevenwinship moved this to In Progress 💻 in IQSS Dataverse Project Apr 15, 2026
@github-actions github-actions Bot added FY26 Sprint 21 FY26 Sprint 21 (2026-04-08 - 2026-04-22) Original size: 3 Type: Bug a defect labels Apr 15, 2026
@stevenwinship stevenwinship added this to the 6.11 milestone Apr 15, 2026
@coveralls

coveralls commented Apr 15, 2026

Copy link
Copy Markdown

Coverage Status

Coverage is 25.012%11253-inconsistent-dataset-delete-api into develop. No base build found for develop.

@github-actions

This comment has been minimized.

@stevenwinship stevenwinship moved this from In Progress 💻 to Ready for Review ⏩ in IQSS Dataverse Project Apr 16, 2026
@stevenwinship stevenwinship removed their assignment Apr 16, 2026
@stevenwinship
stevenwinship force-pushed the 11253-inconsistent-dataset-delete-api branch from 753818d to 153ec4c Compare April 16, 2026 22:36
@github-actions

This comment has been minimized.

@stevenwinship
stevenwinship force-pushed the 11253-inconsistent-dataset-delete-api branch from 153ec4c to 09a31f7 Compare April 20, 2026 22:15
@github-actions

This comment has been minimized.

@stevenwinship
stevenwinship force-pushed the 11253-inconsistent-dataset-delete-api branch from 09a31f7 to f83ba61 Compare April 21, 2026 15:21
@github-actions

This comment has been minimized.

@cmbz cmbz added the FY26 Sprint 22 FY26 Sprint 22 (2026-04-22 - 2026-05-06) label Apr 22, 2026
@stevenwinship
stevenwinship force-pushed the 11253-inconsistent-dataset-delete-api branch 2 times, most recently from 106b4dc to 7a441b4 Compare April 27, 2026 13:10
@github-actions

This comment has been minimized.

@stevenwinship
stevenwinship force-pushed the 11253-inconsistent-dataset-delete-api branch from 7a441b4 to b0124fb Compare April 30, 2026 13:16
@github-actions

This comment has been minimized.

@stevenwinship
stevenwinship force-pushed the 11253-inconsistent-dataset-delete-api branch from b0124fb to 81859f7 Compare May 2, 2026 14:13
@github-actions

This comment has been minimized.

@stevenwinship
stevenwinship force-pushed the 11253-inconsistent-dataset-delete-api branch from 81859f7 to fbe0852 Compare May 6, 2026 18:10
@github-actions

This comment has been minimized.

@cmbz cmbz added the FY26 Sprint 23 FY26 Sprint 23 (2026-05-06 - 2026-05-20) label May 6, 2026
@stevenwinship
stevenwinship force-pushed the 11253-inconsistent-dataset-delete-api branch from fbe0852 to 72bf6b7 Compare May 7, 2026 19:49
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@cmbz cmbz added the FY27 Sprint 2 FY27 Sprint 2 (2026-07-15 - 2026-07-29) label Jul 15, 2026
@cmbz cmbz added the FY27 Sprint 3 FY27 Sprint 3 (2026-07-29 - 2026-08-12) label Jul 29, 2026
@stevenwinship stevenwinship modified the milestone: 6.12 Aug 11, 2026
@github-actions

This comment has been minimized.

@qqmyers qqmyers moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Aug 12, 2026
@qqmyers qqmyers self-assigned this Aug 12, 2026
@cmbz cmbz added the FY27 Sprint 4 FY27 Sprint 4 (2026-08-12 - 2026-08-26) label Aug 12, 2026

@qqmyers qqmyers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From QA: This appears to now work as discussed in the issue, which I think continues to be inconsistent with the documentation. When published version(s) and a draft exist, the Delete Unpublished Dataset API just deletes the draft and doesn't fail because the dataset has been published.

I'd suggest one of two changes:

  1. make this only work if there is only a draft, or
  2. adjust the docs to make it "Delete Unpublished Dataset Changes" and explain it removes a draft version (and metadata changes and deletes any files added in the draft) which results in deletion of the dataset if there are no published versions.

If it always deletes a draft (if one exists) - i.e. option 2, it's more of a duplicate of the DELETE /api/datasets/versions/{versionId} call (which, despite the signature, only works on drafts), so limiting this call to truly deleting unpublished datasets only might be more useful, but it's a bigger backward incompatible change. Option 2 also results in redundant code if there's no clean-up.

I'm not sure what the process should be to make a choice - perhaps just standup discussion?

Also - the PR doesn't update the change log to note the backward incompatibility (for superusers only at present).

Otherwise - the api does remove the draft, delete draft only files and not files in published versions, does redirect superusers to the destroy api as intended.

@stevenwinship

stevenwinship commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

@qqmyers @pdurbin I added to the native api and changelog docs. Please take a look

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@github-actions

This comment has been minimized.

2 similar comments
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:11253-inconsistent-dataset-delete-api
ghcr.io/gdcc/configbaker:11253-inconsistent-dataset-delete-api

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

@pdurbin pdurbin self-assigned this Aug 19, 2026
@pdurbin

pdurbin commented Aug 21, 2026

Copy link
Copy Markdown
Member

We discussed this yesterday and I suggested to @qqmyers that he could make a fresh pull request show how he thinks the APIs should change. He said he would but no rush! As discussed, this is not a must have.

@qqmyers

qqmyers commented Aug 24, 2026

Copy link
Copy Markdown
Member

#12639 extends/replaces this PR.

@cmbz cmbz added the FY27 Sprint 5 FY27 Sprint 5 (2026-08-26 - 2026-09-09) label Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 21 FY26 Sprint 21 (2026-04-08 - 2026-04-22) FY26 Sprint 22 FY26 Sprint 22 (2026-04-22 - 2026-05-06) FY26 Sprint 23 FY26 Sprint 23 (2026-05-06 - 2026-05-20) FY26 Sprint 24 FY26 Sprint 24 (2026-05-20 - 2026-06-03) FY26 Sprint 25 FY26 Sprint 25 (2026-06-03 - 2026-06-17) FY26 Sprint 26 FY26 Sprint 26 (2026-06-17 - 2026-07-01) FY27 Sprint 1 FY27 Sprint 1 (2026-07-01 - 2026-07-15) FY27 Sprint 2 FY27 Sprint 2 (2026-07-15 - 2026-07-29) FY27 Sprint 3 FY27 Sprint 3 (2026-07-29 - 2026-08-12) FY27 Sprint 4 FY27 Sprint 4 (2026-08-12 - 2026-08-26) FY27 Sprint 5 FY27 Sprint 5 (2026-08-26 - 2026-09-09) Original size: 3 Type: Bug a defect Waiting

Projects

Status: QA ✅

Development

Successfully merging this pull request may close these issues.

Inconsistent behaviour of dataset delete API

6 participants