Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 136
    • Merge requests 136
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !149

Merged
Created Jul 26, 2016 by Jérome Perrin@jeromeOwner

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

  • Overview 1
  • Commits 4
  • 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
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: upgrader_post_upgrade_after_upgrade_activities
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7