bump compose-go to version v2.9.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
@@ -6,7 +6,7 @@ require (
|
|||||||
github.com/Masterminds/semver/v3 v3.4.0
|
github.com/Masterminds/semver/v3 v3.4.0
|
||||||
github.com/Microsoft/go-winio v0.6.2
|
github.com/Microsoft/go-winio v0.6.2
|
||||||
github.com/aws/aws-sdk-go-v2/config v1.27.27
|
github.com/aws/aws-sdk-go-v2/config v1.27.27
|
||||||
github.com/compose-spec/compose-go/v2 v2.9.0
|
github.com/compose-spec/compose-go/v2 v2.9.1
|
||||||
github.com/containerd/console v1.0.5
|
github.com/containerd/console v1.0.5
|
||||||
github.com/containerd/containerd/v2 v2.1.4
|
github.com/containerd/containerd/v2 v2.1.4
|
||||||
github.com/containerd/continuity v0.4.5
|
github.com/containerd/continuity v0.4.5
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
|
|||||||
github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA=
|
github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA=
|
||||||
github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb h1:EDmT6Q9Zs+SbUoc7Ik9EfrFqcylYqgPZ9ANSbTAntnE=
|
github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb h1:EDmT6Q9Zs+SbUoc7Ik9EfrFqcylYqgPZ9ANSbTAntnE=
|
||||||
github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb/go.mod h1:ZjrT6AXHbDs86ZSdt/osfBi5qfexBrKUdONk989Wnk4=
|
github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb/go.mod h1:ZjrT6AXHbDs86ZSdt/osfBi5qfexBrKUdONk989Wnk4=
|
||||||
github.com/compose-spec/compose-go/v2 v2.9.0 h1:UHSv/QHlo6QJtrT4igF1rdORgIUhDo1gWuyJUoiNNIM=
|
github.com/compose-spec/compose-go/v2 v2.9.1 h1:8UwI+ujNU+9Ffkf/YgAm/qM9/eU7Jn8nHzWG721W4rs=
|
||||||
github.com/compose-spec/compose-go/v2 v2.9.0/go.mod h1:Oky9AZGTRB4E+0VbTPZTUu4Kp+oEMMuwZXZtPPVT1iE=
|
github.com/compose-spec/compose-go/v2 v2.9.1/go.mod h1:Oky9AZGTRB4E+0VbTPZTUu4Kp+oEMMuwZXZtPPVT1iE=
|
||||||
github.com/containerd/cgroups/v3 v3.0.5 h1:44na7Ud+VwyE7LIoJ8JTNQOa549a8543BmzaJHo6Bzo=
|
github.com/containerd/cgroups/v3 v3.0.5 h1:44na7Ud+VwyE7LIoJ8JTNQOa549a8543BmzaJHo6Bzo=
|
||||||
github.com/containerd/cgroups/v3 v3.0.5/go.mod h1:SA5DLYnXO8pTGYiAHXz94qvLQTKfVM5GEVisn4jpins=
|
github.com/containerd/cgroups/v3 v3.0.5/go.mod h1:SA5DLYnXO8pTGYiAHXz94qvLQTKfVM5GEVisn4jpins=
|
||||||
github.com/containerd/console v1.0.5 h1:R0ymNeydRqH2DmakFNdmjR2k0t7UPuiOV/N/27/qqsc=
|
github.com/containerd/console v1.0.5 h1:R0ymNeydRqH2DmakFNdmjR2k0t7UPuiOV/N/27/qqsc=
|
||||||
|
|||||||
+17
-2
@@ -42,11 +42,26 @@ func ParseVolume(spec string) (types.ServiceVolumeConfig, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var buffer []rune
|
var buffer []rune
|
||||||
for _, char := range spec + string(endOfSpec) {
|
var inVarSubstitution int // Track nesting depth of ${...}
|
||||||
|
for i, char := range spec + string(endOfSpec) {
|
||||||
|
// Check if we're entering a variable substitution
|
||||||
|
if char == '$' && i+1 < len(spec) && rune(spec[i+1]) == '{' {
|
||||||
|
inVarSubstitution++
|
||||||
|
buffer = append(buffer, char)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if we're exiting a variable substitution
|
||||||
|
if char == '}' && inVarSubstitution > 0 {
|
||||||
|
inVarSubstitution--
|
||||||
|
buffer = append(buffer, char)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case isWindowsDrive(buffer, char):
|
case isWindowsDrive(buffer, char):
|
||||||
buffer = append(buffer, char)
|
buffer = append(buffer, char)
|
||||||
case char == ':' || char == endOfSpec:
|
case (char == ':' || char == endOfSpec) && inVarSubstitution == 0:
|
||||||
if err := populateFieldFromBuffer(char, buffer, &volume); err != nil {
|
if err := populateFieldFromBuffer(char, buffer, &volume); err != nil {
|
||||||
populateType(&volume)
|
populateType(&volume)
|
||||||
return volume, fmt.Errorf("invalid spec: %s: %w", spec, err)
|
return volume, fmt.Errorf("invalid spec: %s: %w", spec, err)
|
||||||
|
|||||||
+2
-3
@@ -81,13 +81,12 @@ func applyServiceExtends(ctx context.Context, name string, services map[string]a
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
base any
|
base any
|
||||||
processor PostProcessor
|
processor PostProcessor = NoopPostProcessor{}
|
||||||
)
|
)
|
||||||
|
|
||||||
if file != nil {
|
if file != nil {
|
||||||
refFilename := file.(string)
|
refFilename := file.(string)
|
||||||
services, processor, err = getExtendsBaseFromFile(ctx, name, ref, filename, refFilename, opts, tracker)
|
services, processor, err = getExtendsBaseFromFile(ctx, name, ref, filename, refFilename, opts, tracker)
|
||||||
post = append(post, processor)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -105,7 +104,7 @@ func applyServiceExtends(ctx context.Context, name string, services map[string]a
|
|||||||
}
|
}
|
||||||
|
|
||||||
// recursively apply `extends`
|
// recursively apply `extends`
|
||||||
base, err = applyServiceExtends(ctx, ref, services, opts, tracker, post...)
|
base, err = applyServiceExtends(ctx, ref, services, opts, tracker, processor)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -177,6 +177,9 @@ func importResources(source map[string]any, target map[string]any) error {
|
|||||||
if err := importResource(source, target, "configs"); err != nil {
|
if err := importResource(source, target, "configs"); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if err := importResource(source, target, "models"); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -260,12 +260,14 @@ func WithProfiles(profiles []string) func(*Options) {
|
|||||||
// PostProcessor is used to tweak compose model based on metadata extracted during yaml Unmarshal phase
|
// PostProcessor is used to tweak compose model based on metadata extracted during yaml Unmarshal phase
|
||||||
// that hardly can be implemented using go-yaml and mapstructure
|
// that hardly can be implemented using go-yaml and mapstructure
|
||||||
type PostProcessor interface {
|
type PostProcessor interface {
|
||||||
yaml.Unmarshaler
|
|
||||||
|
|
||||||
// Apply changes to compose model based on recorder metadata
|
// Apply changes to compose model based on recorder metadata
|
||||||
Apply(interface{}) error
|
Apply(interface{}) error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type NoopPostProcessor struct{}
|
||||||
|
|
||||||
|
func (NoopPostProcessor) Apply(interface{}) error { return nil }
|
||||||
|
|
||||||
// LoadConfigFiles ingests config files with ResourceLoader and returns config details with paths to local copies
|
// LoadConfigFiles ingests config files with ResourceLoader and returns config details with paths to local copies
|
||||||
func LoadConfigFiles(ctx context.Context, configFiles []string, workingDir string, options ...func(*Options)) (*types.ConfigDetails, error) {
|
func LoadConfigFiles(ctx context.Context, configFiles []string, workingDir string, options ...func(*Options)) (*types.ConfigDetails, error) {
|
||||||
if len(configFiles) < 1 {
|
if len(configFiles) < 1 {
|
||||||
|
|||||||
+17
-12
@@ -531,19 +531,24 @@
|
|||||||
{"type": "object",
|
{"type": "object",
|
||||||
"patternProperties": {
|
"patternProperties": {
|
||||||
"^[a-zA-Z0-9._-]+$": {
|
"^[a-zA-Z0-9._-]+$": {
|
||||||
"type": "object",
|
"oneOf": [
|
||||||
"properties": {
|
{
|
||||||
"endpoint_var": {
|
"type": "object",
|
||||||
"type": "string",
|
"properties": {
|
||||||
"description": "Environment variable set to AI model endpoint."
|
"endpoint_var": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Environment variable set to AI model endpoint."
|
||||||
|
},
|
||||||
|
"model_var": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Environment variable set to AI model name."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false,
|
||||||
|
"patternProperties": {"^x-": {}}
|
||||||
},
|
},
|
||||||
"model_var": {
|
{"type": "null"}
|
||||||
"type": "string",
|
]
|
||||||
"description": "Environment variable set to AI model name."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"patternProperties": {"^x-": {}}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -145,7 +145,7 @@ type ServiceConfig struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ServiceProviderConfig struct {
|
type ServiceProviderConfig struct {
|
||||||
Type string `yaml:"type,omitempty" json:"driver,omitempty"`
|
Type string `yaml:"type,omitempty" json:"type,omitempty"`
|
||||||
Options MultiOptions `yaml:"options,omitempty" json:"options,omitempty"`
|
Options MultiOptions `yaml:"options,omitempty" json:"options,omitempty"`
|
||||||
Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"`
|
Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -119,7 +119,7 @@ github.com/aws/smithy-go/transport/http/internal/io
|
|||||||
# github.com/cenkalti/backoff/v4 v4.3.0
|
# github.com/cenkalti/backoff/v4 v4.3.0
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
github.com/cenkalti/backoff/v4
|
github.com/cenkalti/backoff/v4
|
||||||
# github.com/compose-spec/compose-go/v2 v2.9.0
|
# github.com/compose-spec/compose-go/v2 v2.9.1
|
||||||
## explicit; go 1.23
|
## explicit; go 1.23
|
||||||
github.com/compose-spec/compose-go/v2/cli
|
github.com/compose-spec/compose-go/v2/cli
|
||||||
github.com/compose-spec/compose-go/v2/consts
|
github.com/compose-spec/compose-go/v2/consts
|
||||||
|
|||||||
Reference in New Issue
Block a user