Closed arobirosa closed 1 year ago
Hello @arobirosa I would like to work on this.
Hi @DevPJ9 ,
great to hear that! Do you already how to implement the solution? Do you would like to discuss it together? Let me know. We could describe the solution on this ticket and then create the pull request.
What version of SAP commerce would you like to use for developing?
Do I need to give you any special permissions?
Thanks for helping!
Hello @arobirosa. Thanks for considering my request.
No, I am a bit confused about the requirement , do we have to assign pending arecos "PENDING" status or we just have to log it? I would appreciate some guidance during the implementation of this.
I am not sure about SAP commerce version, not worked with it.
No special permissons are needed as of now, we can discuss it later depending on the requirements as we discuss the solution.
Thanks.
Hi @DevPJ9 ,
I will upgrade the project to SAP commerce 2205.
I believe that a solution could be that DeploymentScriptFinder creates new script executions with status PENDING (new status). Then DeploymentScriptRunner takes these script executions and runs them. If the directory with the areco was removed from disk, the execution script is saved with the status REMOVED_ON_DISK (new status).
Please check if this solution is possible.
Cheers!
ok, sure. I will look into it and let you if I get stuck.
The solution is more complex than what I thought. This ticket is not suitable for contributors.
This change solves an issue when running arecos which remove CMSComponents: The method de.hybris.platform.cms2.servicelayer.interceptor.impl.CMSAbstractComponentRemoveInterceptor#onRemove try to save all models including the script execution models which are just created. This makes the areco fail.
If the script execution models are saved by the runner with the status pending, this bug is solved.
Workaround for the older versions of Areco deployment manager: The method org.areco.ecommerce.deploymentscripts.core.impl.ArecoDeploymentScriptsRunner#run sets the status "error" to the script execution model and saves it before the call "aScript.run()".
Hi @DevPJ9,
Because this ticket solves a bug found on Friday, I want to ask you if I can start working on it on Friday.
Thanks a lot!
Hello @arobirosa. Yes, As you mentioned it requires a good knowledge of SAP technologies and I am working on windows not Linux as well so I think I will not be able to contribute to this task.
Hi @DevPJ9 ,
I will assign this ticket to me.
Under Windows isn't possible to develop with SAP commerce because the path of some files is too long. You must use a VM with linux or a machine with MacOS.
Thanks a lot!
I commited and reverted an integration test to try to reproduce the error with the CMSAbstractComponentRemoveInterceptor. It was not possible.
I will continue with the implementation of this ticket.
Now the deployment scripts which weren't executed because one failed which are in the same hybris extension are shown in backoffice. The deployment manager won't generate the "pending" executions across all extensions because this requires a big refactoring of the script runner and most of the projects only have one extension with deployment scripts.
Is your feature request related to a problem?
If a areco script has an error, the programmers don't know what arecos coming after that one weren't executed.
Describe the solution you'd like
All arecos which will be executed after the error is solved are stored with the status 'PENDING'.
Describe alternatives you've considered
To show the list of pending arecos in a log message.
Additional context Mone