Skip to content

Commit

Permalink
Merge pull request #26 from mutagen-io/v015-dev
Browse files Browse the repository at this point in the history
all: update to Mutagen v0.15.0-beta1
  • Loading branch information
xenoscopic authored Jun 20, 2022
2 parents f8ee7af + f5c6616 commit af824e4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/docker/compose/v2 v2.6.0
github.com/docker/docker v20.10.7+incompatible
github.com/mitchellh/mapstructure v1.5.0
github.com/mutagen-io/mutagen v0.14.0
github.com/mutagen-io/mutagen v0.15.0-beta1
github.com/spf13/cobra v1.4.0
github.com/spf13/pflag v1.0.5
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1098,8 +1098,8 @@ github.com/mutagen-io/fsevents v0.0.0-20180903111129-10556809b434 h1:PYeqqury0vV
github.com/mutagen-io/fsevents v0.0.0-20180903111129-10556809b434/go.mod h1:kmTyqetTEgYl9KF5JlHLKL6LXnhs2/oK5100pcMZRn8=
github.com/mutagen-io/gopass v0.0.0-20170602182606-9a121bec1ae7 h1:0PaUmAw6e54jseSG0ob2U9P1p6p+Sppw3sanphmM4LY=
github.com/mutagen-io/gopass v0.0.0-20170602182606-9a121bec1ae7/go.mod h1:MyZ/hSGB6tVRgiUqOL62QdM31Sy+B8hvbA1roNTHmOc=
github.com/mutagen-io/mutagen v0.14.0 h1:5GZbJ+Ssh9TQlVuh8QyoaWVhg2D2wdPF2ErgX/01hrk=
github.com/mutagen-io/mutagen v0.14.0/go.mod h1:bo5dPG/5wLRC+tvRxwgV6oZvEc7jNK9r1FpY3NUUh5U=
github.com/mutagen-io/mutagen v0.15.0-beta1 h1://0c3HAPtEzV5FXj+2zu8lXOfZKsNHHgCka2SHEHFhY=
github.com/mutagen-io/mutagen v0.15.0-beta1/go.mod h1:bo5dPG/5wLRC+tvRxwgV6oZvEc7jNK9r1FpY3NUUh5U=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
Expand Down
4 changes: 2 additions & 2 deletions pkg/mutagen/configuration.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package mutagen

import (
"github.com/mutagen-io/mutagen/pkg/configuration/forwarding"
"github.com/mutagen-io/mutagen/pkg/configuration/synchronization"
"github.com/mutagen-io/mutagen/pkg/api/models/forwarding"
"github.com/mutagen-io/mutagen/pkg/api/models/synchronization"
)

// sidecarConfiguration encodes sidecar service configuration.
Expand Down
24 changes: 12 additions & 12 deletions pkg/mutagen/liaison.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,15 @@ func (l *Liaison) processProject(project *types.Project) error {
} else if defaults.Destination != "" {
return errors.New("destination URL not allowed in default forwarding configuration")
}
defaultConfigurationForwarding = defaults.Configuration.Configuration()
defaultConfigurationForwarding = defaults.Configuration.ToInternal()
if err := defaultConfigurationForwarding.EnsureValid(false); err != nil {
return fmt.Errorf("invalid default forwarding configuration: %w", err)
}
defaultConfigurationSource = defaults.ConfigurationSource.Configuration()
defaultConfigurationSource = defaults.ConfigurationSource.ToInternal()
if err := defaultConfigurationSource.EnsureValid(true); err != nil {
return fmt.Errorf("invalid default forwarding source configuration: %w", err)
}
defaultConfigurationDestination = defaults.ConfigurationDestination.Configuration()
defaultConfigurationDestination = defaults.ConfigurationDestination.ToInternal()
if err := defaultConfigurationDestination.EnsureValid(true); err != nil {
return fmt.Errorf("invalid default forwarding destination configuration: %w", err)
}
Expand All @@ -208,15 +208,15 @@ func (l *Liaison) processProject(project *types.Project) error {
} else if defaults.Beta != "" {
return errors.New("beta URL not allowed in default synchronization configuration")
}
defaultConfigurationSynchronization = defaults.Configuration.Configuration()
defaultConfigurationSynchronization = defaults.Configuration.ToInternal()
if err := defaultConfigurationSynchronization.EnsureValid(false); err != nil {
return fmt.Errorf("invalid default synchronization configuration: %w", err)
}
defaultConfigurationAlpha = defaults.ConfigurationAlpha.Configuration()
defaultConfigurationAlpha = defaults.ConfigurationAlpha.ToInternal()
if err := defaultConfigurationAlpha.EnsureValid(true); err != nil {
return fmt.Errorf("invalid default synchronization alpha configuration: %w", err)
}
defaultConfigurationBeta = defaults.ConfigurationBeta.Configuration()
defaultConfigurationBeta = defaults.ConfigurationBeta.ToInternal()
if err := defaultConfigurationBeta.EnsureValid(true); err != nil {
return fmt.Errorf("invalid default synchronization beta configuration: %w", err)
}
Expand Down Expand Up @@ -273,21 +273,21 @@ func (l *Liaison) processProject(project *types.Project) error {
networkDependencies[network] = nil

// Compute the session configuration.
configuration := session.Configuration.Configuration()
configuration := session.Configuration.ToInternal()
if err := configuration.EnsureValid(false); err != nil {
return fmt.Errorf("invalid forwarding session configuration for %s: %w", name, err)
}
configuration = forwarding.MergeConfigurations(defaultConfigurationForwarding, configuration)

// Compute the source-specific configuration.
sourceConfiguration := session.ConfigurationSource.Configuration()
sourceConfiguration := session.ConfigurationSource.ToInternal()
if err := sourceConfiguration.EnsureValid(true); err != nil {
return fmt.Errorf("invalid forwarding session source configuration for %s: %w", name, err)
}
sourceConfiguration = forwarding.MergeConfigurations(defaultConfigurationSource, sourceConfiguration)

// Compute the destination-specific configuration.
destinationConfiguration := session.ConfigurationDestination.Configuration()
destinationConfiguration := session.ConfigurationDestination.ToInternal()
if err := destinationConfiguration.EnsureValid(true); err != nil {
return fmt.Errorf("invalid forwarding session destination configuration for %s: %w", name, err)
}
Expand Down Expand Up @@ -379,21 +379,21 @@ func (l *Liaison) processProject(project *types.Project) error {
}

// Compute the session configuration.
configuration := session.Configuration.Configuration()
configuration := session.Configuration.ToInternal()
if err := configuration.EnsureValid(false); err != nil {
return fmt.Errorf("invalid synchronization session configuration for %s: %v", name, err)
}
configuration = synchronization.MergeConfigurations(defaultConfigurationSynchronization, configuration)

// Compute the alpha-specific configuration.
alphaConfiguration := session.ConfigurationAlpha.Configuration()
alphaConfiguration := session.ConfigurationAlpha.ToInternal()
if err := alphaConfiguration.EnsureValid(true); err != nil {
return fmt.Errorf("invalid synchronization session alpha configuration for %s: %v", name, err)
}
alphaConfiguration = synchronization.MergeConfigurations(defaultConfigurationAlpha, alphaConfiguration)

// Compute the beta-specific configuration.
betaConfiguration := session.ConfigurationBeta.Configuration()
betaConfiguration := session.ConfigurationBeta.ToInternal()
if err := betaConfiguration.EnsureValid(true); err != nil {
return fmt.Errorf("invalid synchronization session beta configuration for %s: %v", name, err)
}
Expand Down

0 comments on commit af824e4

Please sign in to comment.