This is a meta issue where we look at modules that depend on Mutliversion, and work towards a "Workspace Preview System" use case.

The modules focused on are:

Multiversion

Replication

Workspace

RELAXed Web Services

  • Depends on Workspace
  • Provides REST API for content replication
  • Provides CouchDB replicator plugin
  • Defines remote config entity
  • Integrate the Replication module

Deploy

  • Depends on Workspace
  • Works with Relaxed
  • Defines Replication entity UI (needs to be moved from Workspace)
  • Diff plugin type

Workbench Moderation

There is also a diagram [PDF], which shows what features are related to each module. Some of these features are existing, and others need implementing.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

timmillwood created an issue. See original summary.

timmillwood’s picture

Issue summary: View changes
FileSize
166.04 KB
juampynr’s picture

Here is a text version of the PDF. I will now proceed to convert some of these requirements into issues and cross those which are already present. Feel free to adjust this list as you wish as I am working out my way through the code of these modules.

Multiversion

  • All content entities are revisionable
  • Revision tree
  • Revision parents
  • Revision conflicts
  • Defines local workspace bundle
  • Defines workspace entity
  • Provides UI for managing and switching workspaces.

Workspace

  • Depends on Multiversion
  • Defines Replicatior service
  • Provides internal replicator plugin for between workspaces.
  • Is Workbench Moderation aware.

Relaxed

  • Depends on Workspace
  • Provides REST API for content replication
  • Provides CouchDB replicator plugin
  • Defines remote config entity

Deploy

  • Depends on Workspace
  • Works with Relaxed
  • Defines Replication entity
  • Diff plugin type
juampynr’s picture

Issue summary: View changes
FileSize
23.65 KB

@timmillwood, I couldn't test Deploy module due to the following issue:

The status report says the following:

Status report

Then, when I try to install the missing dependency, I get the following error:

juampy@Juampy/var/www/drupal8(8.1.x)$ composer require relaxedws/replicator
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Warning: This development build of composer is over 60 days old. It is recommended to update it by running "/usr/local/bin/composer self-update" to get the latest version.
Using version ^1.0@alpha for relaxedws/replicator
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for relaxedws/replicator ^1.0@alpha -> satisfiable by relaxedws/replicator[1.0.0-alpha1].
    - relaxedws/replicator 1.0.0-alpha1 requires doctrine/couchdb dev-master -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

Am I using the right versions of these modules? (Multiversion, Workspace, Relaxed and Deploy) I cloned the 8.x branch of each of them.

timmillwood’s picture

Weird, because the package exists https://packagist.org/packages/doctrine/couchdb

juampynr’s picture

This worked, thanks for the tip @timmillwood!

juampy@Juampy/var/www/drupal8(8.1.x)$ composer require doctrine/couchdb:dev-master
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Removing doctrine/couchdb (1.0.0-beta4)
  - Installing doctrine/couchdb (dev-master 4d3aa73)
    Cloning 4d3aa736649d12d1c65cfff6fa6b0e251de112b1

> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
Writing lock file
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess

juampy@Juampy/var/www/drupal8(8.1.x)$ composer require relaxedws/replicator
Using version ^1.0@alpha for relaxedws/replicator
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing relaxedws/replicator (1.0.0-alpha1)
    Downloading: 100%         

> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
Writing lock file
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
juampynr’s picture

@timmillwood, can you provide with steps on how to test the above requirements which are not strike-through? I would need this in order to be able to create issues for them.

timmillwood’s picture

Revision parents & Revision conflicts, all this data is stored in key_value under the entity.index.rev prefix. Using the services in http://cgit.drupalcode.org/multiversion/tree/src/Entity/Index we can work out what a revision's parent is, and if a revision has two or more children, then the must be a conflict. Currently you can only generate a conflict by doing a replication using the relaxed module.

Workspace module "Provides internal replicator plugin for between workspaces", this is currently handled by http://cgit.drupalcode.org/workspace/tree/src/InternalReplicator.php, after installing multiversion and workspace modules and creating some test content, create a second workspace then go to "/admin/replication/add" and deploy from "default" to the new workspace you created. There are some caching issues here, so you may have to "drush cr" after each step. The workbench moderation integration hasn't been implemented yet but the plan is for when a workspace is marked as approved it automatically replicates.

Relaxed, I think we should change this so it doesn't have to depend on Workspace, but only Multiversion, because it can be used for decoupled sites, and Workspace isn't needed for that. The API follows replication.io protocol as outlined in http://docs.couchdb.org/en/1.6.1/api/index.html. All of the Rest resource plugins we've implemented for this are in http://cgit.drupalcode.org/relaxed/tree/src/Plugin/rest/resource

Deploy module needs a pretty intensive rework, as currently provides a UI to replicate between two endpoints (an entity defined by Relaxed which we are removing). Eventually this will provide a generic UI for replication which follows the mock ups at https://marvelapp.com/11jd8hd

juampynr’s picture

Issue summary: View changes

Thanks Tim, I have moved the list of requirements to the top of the issue and I will adjust it now based on your feedback.

juampynr’s picture

Issue summary: View changes
juampynr’s picture

Issue summary: View changes
juampynr’s picture

Issue summary: View changes
FileSize
35.35 KB
14.59 KB
152.97 KB

Revision parents & Revision conflicts, all this data is stored in key_value under the entity.index.rev prefix. Using the services in http://cgit.drupalcode.org/multiversion/tree/src/Entity/Index we can work out what a revision's parent is, and if a revision has two or more children, then the must be a conflict. Currently you can only generate a conflict by doing a replication using the relaxed module.

I tried the following to provoke a conflict using Relaxed:

1. Created the following endpoints:

Relaxed endpoints

2. Created a node in Default workspace.
3. Deployed it to External Endpoint (CouchDB).
4. Deployed External Endpoint to New Workspace, thus receiving the node.
5. Changed to New Workspace and edited the node.
6. Deployed New Workspace to External Endpoint.
7. Changed to Default Workspace and edited the node.
8. Deployed External Endpoint to Default.

Expected: a conflict, since the node was changed in Default and New Workspace.
Actual: got the message “Successful deployment”. Then when I opened /content, the node is gone.

Workspace module "Provides internal replicator plugin for between workspaces", this is currently handled by http://cgit.drupalcode.org/workspace/tree/src/InternalReplicator.php, after installing multiversion and workspace modules and creating some test content, create a second workspace then go to "/admin/replication/add" and deploy from "default" to the new workspace you created. There are some caching issues here, so you may have to "drush cr" after each step. The workbench moderation integration hasn't been implemented yet but the plan is for when a
workspace is marked as approved it automatically replicates.

I tried the following:

1. Opened admin/replication/add.
2. Created a replication:

Replication

3. Clicked on Deploy.

Expected: I don’t know. I guess that content should be replicated form Default to New Workspace.
Actual: I got this error:

Replication error

Relaxed, I think we should change this so it doesn't have to depend on Workspace, but only Multiversion, because it can be used for decoupled sites, and Workspace isn't needed for that. The API follows replication.io protocol as outlined in http://docs.couchdb.org/en/1.6.1/api/index.html. All of the Rest resource plugins we've implemented for this are in http://cgit.drupalcode.org/relaxed/tree/src/Plugin/rest/resource

Relaxed currently does not depend on Workspace, so I am striking through that requirement at the issue description.

Deploy module needs a pretty intensive rework, as currently provides a UI to replicate between two endpoints (an entity defined by Relaxed which we are removing). Eventually this will provide a generic UI for replication which follows the mock ups at https://marvelapp.com/11jd8hd

Can we get a list of what needs to happen, this could then be split into separate issues.

juampynr’s picture

Issue summary: View changes
timmillwood’s picture

We don't currently flag or resolve conflicts, it is quite happy to just replicate and keep conflicting revisions. So the deployment was successful, but it now has a conflict and will just use one of the two conflicting revisions. If you install multiversion_ui module you should see this in the revsion tab of the node.

Workspace is pretty unstable at the moment, but I thought I had resolved that issue. Make sure you are running the latest dev of multiversion and workspace.

timmillwood’s picture

Issue summary: View changes
timmillwood’s picture

Issue summary: View changes
timmillwood’s picture

Issue summary: View changes
dixon_’s picture

Issue summary: View changes
timmillwood’s picture

Issue summary: View changes
dixon_’s picture

Issue summary: View changes
dixon_’s picture

Issue summary: View changes
dixon_’s picture

Issue summary: View changes
dixon_’s picture

Issue summary: View changes
dixon_’s picture

Issue summary: View changes
dixon_’s picture

Issue summary: View changes
timmillwood’s picture

Issue summary: View changes
dixon_’s picture

Issue summary: View changes
dixon_’s picture

Issue summary: View changes
josephdpurcell’s picture

Issue summary: View changes
josephdpurcell’s picture

Issue summary: View changes
balsama’s picture