[2pack] add ability to continue apply 2pack when one get issue for process "Apply Pack In from Folder"

Description

add two parameter
1. checkbox StopOnError to allow continue apply next 2pack when current get issue
2. checkbox UseDefaultFolder to allow use folder configuration on MSysConfig.AUTOMATIC_PACKIN_FOLDERS in case Folder is empty

Environment

None

Activity

Show:
Carlos Ruiz
July 22, 2020, 10:21 AM

, about #1 - I think that needs to be reviewed in a per-case basis, pushing a way (even configurable) that can easily lead to data corruption is not good.

One of the most common case I see is for example a 2pack changing something (suppose a jasper report), and a subsequent 2pack changing the same for a newer version, if the 2packs are applied in different order then you end with the wrong report, or wrong dictionary.
So, I think it is really important here that on a failure the process stops and the admin must review the impact and solve before continuing.

about #2 i don't want to go process parameter to modify default value each time i change AUTOMATIC_PACKIN_FOLDERS

I'm lost here - why do you need to go every time to process parameter?
I mean, the default reads the SysConfig, via @SQL

Regards,

Carlos Ruiz

Hiep Lq
July 22, 2020, 10:49 AM

#1 agree to you about not continue one error
but when i place 2pack on separate folder it should independence
so root/plugin_1 get issue it should stop on root/plugin_1 only

#2 you're correct, i just forget it

Carlos Ruiz
July 22, 2020, 12:55 PM

Hi , there is no root/plugin_1 and root/plugin_2 in this approach - the naming convention is based on timestamps on the 2pack name, and all the folders are joined and sorted so the 2packs are applied in timestamp order even if they are in different folders.

Also, even in different folders the 2packs can have interdependence, and is still better that somebody reviews if one of the 2packs fail before continuing.

Hiep Lq
July 22, 2020, 4:31 PM

thanks for detail explain
what i requested is conflict with design of function (sort all by timestamp) so i will close this one

Hiep Lq
July 23, 2020, 9:32 AM

i attachment patch implement my idea here for store and share
1. 2pack apply by folders, stop on folder when get issue from a 2pack but continue next folder
2. when a folder path end with "/" for linux and "\" for window then list of sub folder is use

example you has this struct folder
[root]
[root]/modify
[root]/plugin/plugin1
[root]/plugin/plugin2
[root]/plugin/plugin3

then AUTOMATIC_PACKIN_FOLDERS should be
AUTOMATIC_PACKIN_FOLDERS=[root]/modify;[root]/plugin/

Assignee

Unassigned

Reporter

Hiep Lq

Labels

Tested By

None

Priority

Major
Configure