valtech / aem-easy-content-upgrade

AEM Easy Content Upgrade simplifies content migrations in AEM projects
Other
61 stars 26 forks source link

Failed script not rerun on next deployment #169

Closed pcastelog closed 2 years ago

pcastelog commented 2 years ago

Hi,

When a script fails during hook execution, it appears as "failed" in the UI but in case the package is installed again the script that was wrongly executed the last time will be skipped and the new ones will be executed. This is causing that after the second install even when a script in the package was not executed at all, it appears as "lastExecutionSuccesful = true".

Do you have a reason to not execute it again with the hook in the next deployment?

Best Regards, Pablo Castelo

gruberrolandvaltech commented 2 years ago

Hi Pablo,

the failed script should be reviewed and modified for next deployment. E.g. sanity checks could be added. Once the script is modified it will be executed again even if the file name is not changed.

AECU only executes new and modified scripts.

Best regards

Roland

pcastelog commented 2 years ago

Well, I see that behavior for upper environments like stagging where the deployments are manually done by an operator. But for an environment with continuous deployment (every merge on develop) this will hide the issue since in the next deployment everything will be green.

From my point of view makes sense to fail the execution till is fixed to send feedback that you still need to work on it.

Thanks!

gruberrolandvaltech commented 2 years ago

Yes, I get your point. There are also issues with depending scripts that get executed on the second run. This will be fixed.

gruberrolandvaltech commented 2 years ago

Fixed with https://github.com/valtech/aem-easy-content-upgrade/pull/173