damirarh / damirscorner-utterances

utteranc.es comments for https://damirscorner.com
0 stars 0 forks source link

/blog/posts/20190412-RunHippoUpdaterScriptsOnStartup.html #87

Open damirarh opened 1 year ago

damirarh commented 1 year ago

Imported

URL: https://www.damirscorner.com/blog/posts/20190412-RunHippoUpdaterScriptsOnStartup.html

damirarh commented 1 year ago

Imported comment written by Sam on 2019-07-12T10:10:36

Hi Damir, nice article! Just one thing you might want to review. Looks like the version update is not needed because the action seems to be always executed as long as it is specified in the hcm-actions.

damirarh commented 1 year ago

Imported comment written by Damir Arh on 2019-07-14T15:33:07

I did another test in my development environment and I get the same behavior: the action is executed on every startup. You seem to be correct.

However, I engineered my approach based on the documentation which states that actions will only be executed once and the version sequence number is used to determine which actions have already been executed (unless I misunderstood something):

The content actions file contains a list of actions, grouped by a version sequence number. The sequence number has Module scope, and is used to make sure that every action is only executed once. So, if above actions list is deployed to environment E where, previously, actions with sequence number 1.0 have already been executed, the bootstrapping process will only execute actions with version number greater than 1.0.

Having a different version on each deploy should prevent the action from not being executed.