Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content/Channel Deletion Task: force_delete not forcing deletion #12606

Closed
nucleogenesis opened this issue Aug 26, 2024 · 3 comments · Fixed by #12680
Closed

Content/Channel Deletion Task: force_delete not forcing deletion #12606

nucleogenesis opened this issue Aug 26, 2024 · 3 comments · Fixed by #12680
Assignees
Labels
APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) DEV: backend Python, databases, networking, filesystem... help wanted Open source contributors welcome TAG: regression Something that previously worked

Comments

@nucleogenesis
Copy link
Member

Observed behavior

  • Have two channels imported into Kolibri which share resources. (ie, create a new Studio channel, copy-paste content from another channel to it, publish your channel, import it along w/ the channel you copy-pasted from).
  • Go through process of deleting a resource from one of those channels, click the "delete from all other locations" checkbox on the "Delete" modal
  • See that the resource is successfully deleted from the channel where you did the deletion, but it remains in your other channel nonetheless.
2024-08-26.15-07-17.mp4

Errors and logs

The task creation API request payload:

{
    "type": "kolibri.core.content.tasks.deletechannel",
    "channel_id": "737804b26629425284ef48fa1b1e1bde",
    "channel_name": "Jacob Test 1",
    "node_ids": [
        "68a05f33789a43a5b6b1d47e287eb2b9"
    ],
    "exclude_node_ids": [],
    "force_delete": true  // This is what should be ensuring that the content is deleted everywhere
}

The response:

{
    "status": "QUEUED",
    "type": "kolibri.core.content.tasks.deletechannel",
    "exception": null,
    "traceback": "",
    "percentage": 0,
    "id": "c4534149d8f54317938dabf7a8109395",
    "cancellable": false,
    "clearable": false,
    "facility_id": null,
    "args": [
        "737804b26629425284ef48fa1b1e1bde"
    ],
    "kwargs": {
        "node_ids": [
            "68a05f33789a43a5b6b1d47e287eb2b9"
        ],
        "exclude_node_ids": []
    },
    "extra_metadata": {
        "channel_name": "Jacob Test 1",
        "channel_id": "737804b26629425284ef48fa1b1e1bde",
        "started_by": "cc3dfc1f3003400add64f62807186afc",
        "started_by_username": "a"
    },
    "scheduled_datetime": "2024-08-26T22:07:43.467447+00:00",
    "repeat": 0,
    "repeat_interval": 0,
    "retry_interval": null
}

Expected behavior

Clicking the "remove from everywhere" checkbox should result in the content being removed from all channels in which it has been imported.

More like - when force_delete is sent when creating the deletechannel task, it should remove that content from all channels.

User-facing consequences

User is given an option which doesn't do anything when selected.

Context

Found while fixing regression causing the checkbox itself not to toggle when clicked (#12589) -- but that is unrelated to this particular issue, just how I stumbled across it.

  • Kolibri release-v0.17.x devserver
  • Fedora 40
  • Chromium
@nucleogenesis nucleogenesis added DEV: backend Python, databases, networking, filesystem... TAG: regression Something that previously worked APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) help wanted Open source contributors welcome labels Aug 26, 2024
@thesujai
Copy link
Contributor

Hi, I am happy to take this issue

@nucleogenesis
Copy link
Member Author

I've assigned you @thesujai - thanks for taking this on!

@rtibbles
Copy link
Member

Fixed in #12680

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) DEV: backend Python, databases, networking, filesystem... help wanted Open source contributors welcome TAG: regression Something that previously worked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants
@rtibbles @nucleogenesis @marcellamaki @thesujai and others