Skip to content

[feature request] Support of Ordered Container Start #321

@mathieu-benoit

Description

@mathieu-benoit

Support of Ordered Container Start coming from this new Spec version:

The Spec itself is not yet released, the goal is to use the Spec version from this specific branch first: https://github.com/kai-kystverket/spec/tree/feat/add-before-field-to-containers and this needs to integrated in a temporary score-go version with this: score-spec/score-go#118.

depends_on is the essential ingredient here: https://github.com/compose-spec/compose-spec/blob/main/05-services.md#depends_on. Compose supports waiting for started, ready, or completed. However we are inverting the depends_on to be "before". This should be fine.

These should be caught when running score-xyz generate.

  • cyclic relationship container-a.before.containers = [container-b]; container-b.before.containers = [container-a]
  • unknown links container-a.before.containers = [unknown]
  • Some Score implementations may not support any kind of ready field.
containers:
  init-one:
    ...
    before:
      containers:
      - init-two
  init-two:
    ...
    before:
      containers:
      - main
  main:
    ...
containers:
  init:
    ...
    before:
      ready: complete # implicit default
      containers:
      - main
  sidecar:
    ...
    before:
      containers:
      - main
      ready: started
  main:
    ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionenhancementNew feature or requestgoPull requests that update Go code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions