Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 142
    • Merge requests 142
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • erp5erp5
  • Merge requests
  • !149

Upgrader: refactor to make sure to execute post upgrade after upgrade activities

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Jérome Perrin requested to merge jerome/erp5:upgrader_post_upgrade_after_upgrade_activities into master Jul 26, 2016
  • Overview 1
  • Commits 4
  • Pipelines 0
  • Changes 20

Often post-upgrader steps does not run because it is stuck in Is required run upgrade before solve it. You need run active sense once at least on this alarm.

The reason for that specific problem is because for portal_alarms.upgrader_check_upgrader.sense() to work, we need the active process created by this upgrade step to be reindexed, but the post upgrade activity does not wait for it, so sometimes post upgrade is executed before the active process is reindexed, in other words, it is executed before the result of portal_alarms.upgrader_check_upgrader.sense() can be trusted and instead of executing post upgrade, post upgrade just return this Is required solve Pre Upgrade first. You need run active sense once at least on this alarm message.

But in my understanding, this explicit check is not needed at all, so I prefer we remove it. If there was a reason I did not understand, please explain.

My understanding is that if for some reason site administrator decides to run only one upgrader step and not the full pre-upgrade, upgrade, post-upgrade chain the code should not prevent this.

Appart from using defaultActivateParameterDict(activate_kw, placeless=True) to propagate dependency when creating the active process, this is a major refactoring that aims at simplifying the code by using more of the features already provided by alarms (for example fixit instead of force).

I have commited the changes to test in separate commits to explain what behavior changed exactly.

One notable change is also 430511cc where we strictly implement upgrader step is done in one transaction and do not try to be too clever and catch configuration mistakes.

Tests are still running in https://nexedi.erp5.net/test_result_module/20160726-265EA792/

Please review @Nicolas @gabriel , maybe @arnau or @seb too.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: upgrader_post_upgrade_after_upgrade_activities
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7