Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions src/pkg/cli/cd.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"connectrpc.com/connect"
"github.com/DefangLabs/defang/src/pkg"
"github.com/DefangLabs/defang/src/pkg/cli/client"
"github.com/DefangLabs/defang/src/pkg/cli/client/byoc/state"
"github.com/DefangLabs/defang/src/pkg/dryrun"
"github.com/DefangLabs/defang/src/pkg/logs"
"github.com/DefangLabs/defang/src/pkg/term"
Expand Down Expand Up @@ -145,13 +144,7 @@ func CdListFromStorage(ctx context.Context, provider client.Provider, allRegions
return err
}

stacks := slices.Collect(func(yield func(state.Info) bool) {
for stackInfo := range stacksIter {
if !yield(stackInfo) {
return
}
}
})
stacks := slices.Collect(stacksIter)

if len(stacks) == 0 {
accountInfo, err := provider.AccountInfo(ctx)
Expand All @@ -164,7 +157,7 @@ func CdListFromStorage(ctx context.Context, provider client.Provider, allRegions
term.Printf("No projects found in %v\n", accountInfo)
}

return term.Table(stacks, "Project", "Stack", "Workspace", "Region")
return term.Table(stacks, "Project", "Stack", "Workspace", "CdRegion")
}

func GetStatesAndEventsUploadUrls(ctx context.Context, projectName string, provider client.Provider, fabric client.FabricClient) (statesUrl string, eventsUrl string, err error) {
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/cli/client/byoc/aws/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (b *ByocAws) listPulumiStacksInBucket(ctx context.Context, region aws.Regio
Project: st.Project,
Stack: st.Name,
Workspace: string(st.Workspace),
Region: string(region),
CdRegion: string(region),
}
if !yield(info) {
break
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/cli/client/byoc/do/byoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func (b *ByocDo) CdList(ctx context.Context, _allRegions bool) (iter.Seq[state.I
Project: st.Project,
Stack: st.Name,
Workspace: string(st.Workspace),
Region: string(b.driver.Region),
CdRegion: string(b.driver.Region),
}
if !yield(info) {
break
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/cli/client/byoc/gcp/byoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ func (b *ByocGcp) CdList(ctx context.Context, _allRegions bool) (iter.Seq[state.
Stack: st.Name,
Project: st.Project,
Workspace: string(st.Workspace),
Region: b.driver.GetRegion(),
CdRegion: b.driver.GetRegion(),
}
if !yield(stack) {
break
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/cli/client/byoc/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ type Info struct {
Project string
Stack string
Workspace string
Region string
CdRegion string // not necessarily the stack region
}
Loading