Skip to content

ESoCC: Update channel publishing logic to support publishing channel draft versions #5192

@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

We will now provide backend support for publishing regular channel draft versions. For this, we will reuse the same PUBLISHED_NEXT change type that was being used to publish the channel staging tree, but now to publish the main_tree as a draft version.

Technical requirements

  • As we will be using the same change type for this, we will need to differentiate whether the next version will be pointing to the main tree or the staging tree. For this, we can use the use_staging_tree boolean variable, but it will now be an argument of the change, rather than implying that all PUBLISHED_NEXT changes were using the staging tree.
  • We will need to add a new argument to the publish method, to differentiate whether we are publishing a next version or not, and keep the current use_staging_tree argument to select the base tree that will be published.
  • For this, we will need to revisit the publishing logic, and differentiate the logic of publishing a next version (i.e., without marking nodes as published, increasing the version, etc) vs the logic of using the main tree or the staging tree.
  • For now, we won't allow publishing "non-next" versions that use the staging tree instead of the main tree, so doing a check for this in the publish method can be a good idea.
  • Finally, we should update the current tests to cover the new draft publish behavior.

Acceptance criteria

  • The publish method now supports publishing a channel main tree as a next version.
  • Unit tests have been added.

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions