Skip to content

GitLab

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

Merged
Created Feb 15, 2022 by Jérome Perrin@jeromeOwner

runpromises: support software releases older than slapos 1.0.118

  • Overview 9
  • Commits 2
  • Pipelines 4
  • Changes 2

Before slapos commit a184cca8b (Try to reuse existing file to avoid excessive IO on update + other minor optimisations, 2019-06-17), which started to be used in profiles in 65acdca0d (Release slapos.cookbook (1.0.118), 2019-08-13), the promise plugins did not contain

import sys
sys.path[0:0] = (..., )

but there was an extra import statement:

import sys
import json
sys.path[0:0] = (..., )

slapos.core >= 1.7 was not able to process such promises, because the code introspecting these promises assumed that the second node of the AST was the assignment, which is incorrect in the old promises because it was another import.

To accomodate both cases, use the value from the first assignment.

We also change to use ast.literal_eval for safety.

Edited Feb 16, 2022 by Jérome Perrin
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: fix/promises_pre1.0.118
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7