Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • S slapos.recipe.cmmi
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedinexedi
  • slapos.recipe.cmmi
  • Merge requests
  • !10

shared: Fix recovery after an interrupted build

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Jérome Perrin requested to merge fix/failed_build into master Dec 05, 2019
  • Overview 6
  • Commits 1
  • Pipelines 1
  • Changes 2

When build process is interrupted (like when the buildout process terminated by SIGKILL), building with shared leave the system in a state that looks like installation succeeded, so next execution will assume the part was properly installed.

The behavior was something like this:

if isSharedPartSignatureOK():
  useThisAlreadyInstalledPart()
else:
  writeSignatureInSharedPart()
  try:
    build()
  except:
    removeSharedPart()
    raise

and when program is terminated during build step, the signature is there.

The fix is to write signature later, algorithm becomes:

if isSharedPartSignatureOK():
  useThisAlreadyInstalledPart()
else:
  try:
    build()
  except:
    removeSharedPart()
    raise
  writeSignatureInSharedPart()
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/failed_build
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7