Skip to content

ESoCC: Ensure that channel version's database exists when a community library submission is created #5191

@AlexVelezLl

Description

@AlexVelezLl

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

As part of the Community Library approval workflow, we assume that the channel database for the given channel version exists and that we can map this channel version's data to the kolibri_public models. However, there may be edge cases where the current channel version was published before we implemented these versioned channel databases, meaning the channel database might not exist at the time of a submission approval.

Technical requirements

  • When a Community Library submission is created, we will need to verify if the channel database for that specific channel version exists in storage. If it doesn't, we will create a copy of the current channel's main channel database and name it as the channel version's database.
    • For example, if a user creates a submission for version X of channel Y, and the channel database X-Y.sqlite3 doesn't exist in storage, we will make a copy of the channel's current channel database (e.g., Y.sqlite3) and name it X-Y.sqlite3. This ensures that the specific channel version database exists when the channel's data is mapped to the kolibri_public models during the approval workflow.

Acceptance criteria

  • A new channel-versioned database is created in the storage if it doesn't exists when the user is creating a new community library submission.

Metadata

Metadata

Assignees

Labels

P0 - criticalPriority: Release blocker or regression

Type

No fields configured for Task.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions