erp5_upgrader: pass activate_kw to ActiveProcess's constructor
FullUpgrade Alarm relies on getLastActiveProcess to return results, which makes use of the catalog to return a result. If the Active Processes spawned by the 3 Alarms composing the upgrader (pre, upgrade, post) are not indexed before the FullUpgrade Alarm collects the results, then the wrong active result is returned, which then give the wrong feedback to the user. It seems that the "defaultActivateParameterDict" method cannot overwrite the "tag" parameter of indexation activities (even if it was working for after_tag). This is why this commit is needed.
-
Owner
I think it would be better to understand why tag is not affected by default parameters. Maybe it is provided as explicit parameter when creating the activity, which would then override default value ?
-
Developer
Alarm.newActiveProcess sets a default tag if no dictionary activate_kw containing a tag key is given as parameter.
@vpelletier : do you think we should call getDefaultActivateParameterDict in Alarm.newActiveProcess and update it with the potential activate_kw given in parameters ?
-
Owner
This makes sense indeed. FWIW, I traced it back to 6c88e86a and the intent is correct. I think your commit is good as is.
What itches me now is to see
newActiveSense
modifyingactivate_kw
when caller provides it and does not pass a"tag"
key in it... But that's a separate issue.So if tests are still happy and you did not discover other scheduling issues since this one, this can be merged.