Use case
A service invoices depends on another service's stack users, and we to make sure that a supported version of users is deployed when building a local dev stack.
Proposal
Schema
#SemVer: {
prefix: string | *""
major: uint | *0
minor: uint | *0
patch: uint | *0
suffix: string | *""
value: "\(prefix)\(major).\(minor).\(patch)\(suffix)"
}
#Component: {
$metadata: {
id: string
labels: [string]: string
version: #SemVer
}
#Trait
}
Service invoices that depends on an imported stack of another service users and want to constrain the supported version
package main
import (
"guku.io/devx/v1"
"guku.io/devx/v1/traits"
)
stack: v1.#Stack & {
components: {
users: $metadata: version: {
major: 10
minor: >=20
}
invoices: {
traits.#Workload
containers: default: {
image: "docker/whalesay"
command: ["cowsay"]
args: ["Hello DevX!"]
env: USER_SERVICE_HOST: users.endpoints.default.host
}
}
}
}
Use case
A service
invoicesdepends on another service's stackusers, and we to make sure that a supported version ofusersis deployed when building a local dev stack.Proposal
Schema
Service
invoicesthat depends on an imported stack of another serviceusersand want to constrain the supported version