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 26
    • Merge requests 26
  • 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
  • !786

Merged
Created Jun 04, 2025 by Xavier Thompson@xavier_thompsonOwner

promise: Introduce GenericPromise.allowBang()

  • Overview 14
  • Commits 4
  • Changes 2

Alternative to !785 (closed)

Intended to be used in promise implementations like this:

@implementer(interface.IPromise)
class RunPromise(GenericPromise):
  def __init__(self, config):
    super(RunPromise, self).__init__(config)
    self.allowBang(False)

  def sense(self):
    # ...

  def anomaly(self):
    # no need to return TestResult to avoid calling bang
    # ...

Further, promise configuration in buildout like this

[promise]
...
config-bang-on-failure = false

is propagated directly to GenericPromise.allowBang(), independently of the specific promise implementation. The promise remains free to override this with an explicit allowBang() after the call to GenericPromise.__init__().

Edited Jul 11, 2025 by Xavier Thompson
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: feat/promise-disallow-bang-api
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7