Skip to content

Commit

Permalink
Add FQN for filestate and simply output
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Nov 18, 2022
1 parent 525b37e commit c0c0455
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
5 changes: 2 additions & 3 deletions pkg/backend/filestate/backend.go
Expand Up @@ -99,9 +99,8 @@ func (r localBackendReference) Name() tokens.Name {
return r.name
}

func (c localBackendReference) FullyQualifiedName() tokens.Name {
// TODO[pulumi/pulumi#11390]: Unable to provide this value until we solve this issue.
return tokens.Name("")
func (r localBackendReference) FullyQualifiedName() tokens.Name {
return r.Name()
}

func IsFileStateBackendURL(urlstr string) bool {
Expand Down
32 changes: 15 additions & 17 deletions pkg/cmd/pulumi/about.go
Expand Up @@ -86,17 +86,16 @@ type summaryAbout struct {
// We use pointers here to allow the field to be nullable. When
// constructing, we either fill in a field or add an error. We still
// indicate that the field should be present when we serialize the struct.
Plugins []pluginAbout `json:"plugins"`
Host *hostAbout `json:"host"`
Backend *backendAbout `json:"backend"`
CurrentStack *currentStackAbout `json:"currentStack"`
CLI *cliAbout `json:"cliAbout"`
Runtime *projectRuntimeAbout `json:"runtime"`
Dependencies []programDependencyAbout `json:"dependencies"`
ErrorMessages []string `json:"errors"`
StackReference string `json:"stackReference"`
Errors []error `json:"-"`
LogMessage string `json:"-"`
Plugins []pluginAbout `json:"plugins"`
Host *hostAbout `json:"host"`
Backend *backendAbout `json:"backend"`
CurrentStack *currentStackAbout `json:"currentStack"`
CLI *cliAbout `json:"cliAbout"`
Runtime *projectRuntimeAbout `json:"runtime"`
Dependencies []programDependencyAbout `json:"dependencies"`
ErrorMessages []string `json:"errors"`
Errors []error `json:"-"`
LogMessage string `json:"-"`
}

func getSummaryAbout(ctx context.Context, transitiveDependencies bool, selectedStack string) summaryAbout {
Expand Down Expand Up @@ -427,12 +426,11 @@ func (current currentStackAbout) String() string {
Rows: rows,
}.String() + "\n"
}
return fmt.Sprintf(`Current Stack: %s
Fully qualified stack name: %s
%s
%s`, current.Name, current.FullyQualifiedName, resources, pending)
stackName := current.Name
if stackName != current.FullyQualifiedName {
stackName += fmt.Sprintf(" (fully qualified to %q)", current.FullyQualifiedName)
}
return fmt.Sprintf("Current Stack: %s\n\n%s\n%s", stackName, resources, pending)
}

func simpleTableRows(arr [][]string) []cmdutil.TableRow {
Expand Down

0 comments on commit c0c0455

Please sign in to comment.