arobirosa / areco-deployment-script-manager

Simple but powerful Patch system for SAP Commerce Cloud (hybris)
Apache License 2.0
12 stars 5 forks source link

Init Deployment Scripts are run in the core extension during project data #3

Closed arobirosa closed 4 years ago

arobirosa commented 4 years ago

This issue was originally reported on Sourceforge

Steps to reproduce this error

  1. Set the property deploymentscripts.createdata.type = PROJECT
  2. Create a init deployment script with the following impex code
    
    # SOLR for Backoffice Changes
    INSERT_UPDATE SolrFacetSearchConfig; name[unique = true]        ; currencies(isocode); languages(isocode)
                                   ; Solr Config for Backoffice ; EUR                ; de

INSERT_UPDATE SolrIndexedProperty; name[unique = true]; solrIndexedType(identifier)[unique = true]; useForSpellChecking; useForAutocomplete; ; code ; BackofficeProduct ; false ; false


1. Add the dependency backofficesolrsearch to the extension containing the deployment script
2. Run ant clean all initialize

**Current behaviour**
The initialization fails because the deployment script is executed during the project data of the **core** extension.

**Expected behaviour**
The initialization is successful because the deployment script is executed during the project data of the extension **where is script is located**.
arobirosa commented 4 years ago

I reduce the priority of this ticket because the impex runs in the correct order when moved to an update deployment script.

The current behaviour is correct: They are run before any UPDATE deployment script. Internally they are run during the create essential or project data step of the core extension.

I will extend the Areco deployment manager so it runs the deployment scripts in this order:

The current behaviour is:

I have to do this change carefully because the initialization in the junit tenant is different from the initialization in the master tenant.

arobirosa commented 4 years ago

Using a deployment script to override Hybris' impexes on project data or essential data is wrong. After the project data or essential data step is run, the changes will be gone. ant customize must be used for this cases.

arobirosa commented 4 years ago

Anyway it could be a nice feature to have a different running order for the init scripts

arobirosa commented 4 years ago

If the INIT deployment scripts are moved to the UPDATE deployment script directory, they are run after the project data step of SAP hybris extensions. Due to this, no new feature is required.

For the record: ant customize can't be used on the SAP cloud