Skip to content

Add additional parameters to groups in composition files #1337

@laurentsenta

Description

@laurentsenta

Description

We're working on interoperability tests with the go & rust libp2p projects, see #1340

One feature we need is the ability to test different versions of the go-library which means having the ability to customize the docker build image and the dockerfile extensions per group.

Example of a desired composition file:

[metadata]
  name = "ping-interop-cross-version"

[global]
  plan = "libp2p/ping-interop/go"
  case = "ping"
  total_instances = 4
  builder = "docker:go"
  runner = "local:docker"
  # global build parameters here

[[groups]]
  id = "v0.11"
  instances = { count = 1 }

  [groups.build]
    # allow override with local build parameters here.
    docker_build_image  = 'golang:1.14-buster' # <= This is new
    selectors = ['compatv1'] # implements a shim for compat with different API versions
    dockerfile_extension = { pre_mod_download = 'mv ./v0.11/go.* ./' }
      
[[groups]]
  id = "v0.17"
  instances = { count = 1 }

  [groups.build]
    docker_build_image  = 'golang:1.16-buster'
    selectors = ['compatv2']
    dockerfile_extension = { pre_mod_download = 'mv ./v0.17/go.* ./' }

[[groups]]
  id = "v0.19"
  instances = { count = 1 }

  [groups.build]
    docker_build_image  = 'golang:1.18-buster'
    selectors = ['compatv2']
    dockerfile_extension = { pre_mod_download = 'mv ./v0.19/go.* ./' }

What defines this endeavour to be complete?

  • create a corresponding integration test with a similar manifest,
  • add a field build configuration to a composition's group (same content as the global group),
  • make sure the overrides manifest > composition.global > composition.groups are working as expected,
  • make sure the build caching & deduping are taking into account these parameters,
  • have the test passing & use in libp2p.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions