Skip to content

ESoCC: Migration command to ensure channel versioned content databases exist #5592

@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

Until now, we were invoking a background task to do this check, and we were invoking this on a CommunityLibrarySubmission creation to make sure this content database existed in a future stage. However, now we will use a migration command to ensure that all channels in Studio have a versioned content database for their most recent version.

Technical details

For this, we will:

  • Create a new command on contentcuration/contentcuration/management/commands/ensure_versioned_dbs_exist.py.
  • Query all published=True Channels.
  • Iterate through each channel, and call the ensure_versioned_database_exists method for each
    • Use .iterator() method to iterate through the channels to prevent fetching all channels at once.
  • Since this will fix the issue from the root, we can now remove the ensure_versioned_database_exists_task and all its references.

Acceptance criteria

  • A new ensure_versioned_databases_exist command is created.
  • After running the command, all published channels should have a versioned content database after running this command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0 - criticalPriority: Release blocker or regression

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions