/
[deployment] Incomplete output during Synchronization [5.2.2-B1]

[deployment] Incomplete output during Synchronization [5.2.2-B1]

In-Portal comes with built-in deployment tool, that can be used from "Project Deployment" sub-section in "Tools > System Tools" section:

The output from pressing "Synchronize" button looks like this:

Deploying Module "Custom":
Verifying Database Revisions ... OK
Done with Module "Custom".

guest2host_server.sh /Volumes/web/d/in-portal.52x/tools/synchronize.sh
guest2host_client.sh /Volumes/web/d/in-portal.52x/tools/synchronize.sh

The output from pressing "Deploy" button looks like this:

Deploying Module "Custom":
Verifying Database Revisions ... OK
Upgrading Database ... 

# r1: JRA-1223 - Task Description
UPDATE `52x_Categories` SET Status = 1 WHERE FALSE ... OK (1)

# r2: JRA-1243 - Task Description
UPDATE `52x_Categories` SET Status = 2 WHERE FALSE ... OK (1)

Importing LanguagePack ... OK
Done with Module "Custom".

Resetting Configs Files Cache and Parsed System Data ... OK
Resetting Admin Console Sections ... OK
Resetting ModRewrite Cache ... OK
Refreshing Theme Files ... OK

Actually the "Synchronize" button is doing more than is being shown. It also does:

  1. marking all new database revisions as executed without actually executing them
  2. creating "/system/export/Custom.lang" file with latest language pack for Custom module

It's best to indicate that in "Synchronize" button output so it will look like this:

Deploying Module "Custom":
Verifying Database Revisions ... OK
Simulating Database Upgrade ... 

# r1: JRA-1223 - Task Description
...

# r2: JRA-1243 - Task Description
...

Exporting LanguagePack ... OK
Done with Module "Custom".

Solution

  1. in the "DeploymentHelper::exportLanguagePack" method output progress as done in "DeploymentHelper::importLanguagePack" method, but use "Exporting" instead of "Importing" word
  2. change "DeploymentHelper::applyRevisions" method (only in dry run mode) to:
    1. show titles of skipped database revisions
    2. instead of SQLs show "..." because they're not actually executed
    3. show "Simulating Database Upgrade ..." instead of "Upgrading Database ..."

Related Tasks

INP-1693 - Getting issue details... STATUS