Skip to content

Commit

Permalink
Default to remote forks for machines
Browse files Browse the repository at this point in the history
  • Loading branch information
davissp14 committed Jul 28, 2023
1 parent 2751218 commit f6a17e1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
3 changes: 1 addition & 2 deletions flypg/launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/superfly/flyctl/helpers"

"github.com/superfly/flyctl/internal/buildinfo"
"github.com/superfly/flyctl/internal/flag"
mach "github.com/superfly/flyctl/internal/machine"
"github.com/superfly/flyctl/internal/watch"

Expand Down Expand Up @@ -189,8 +188,8 @@ func (l *Launcher) LaunchMachinesPostgres(ctx context.Context, config *CreateClu
AppID: app.ID,
SourceVolumeID: config.ForkFrom,
MachinesOnly: true,
Remote: true,
Name: "pg_data",
Remote: flag.GetBool(ctx, "remote-fork"),
}

vol, err = l.client.ForkVolume(ctx, volInput)
Expand Down
6 changes: 0 additions & 6 deletions internal/command/postgres/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ func newCreate() *cobra.Command {
Name: "fork-from",
Description: "Specify a source Postgres application to fork from. Format: <app-name> or <app-name>:<volume-id>",
},
flag.Bool{
Name: "remote-fork",
Description: "Enables experimental cross-host volume forking",
Hidden: true,
Default: false,
},
flag.String{
Name: "image-ref",
Description: "Specify a non-default base image for the Postgres app",
Expand Down
2 changes: 1 addition & 1 deletion internal/command/volumes/fork.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func runFork(ctx context.Context) error {
SourceVolumeID: vol.ID,
Name: name,
MachinesOnly: machinesOnly,
Remote: flag.GetBool(ctx, "remote-fork"),
Remote: machinesOnly,
}

volume, err := client.ForkVolume(ctx, input)
Expand Down

0 comments on commit f6a17e1

Please sign in to comment.