diff --git a/pkg/cli/cmd/app/graph/graph.go b/pkg/cli/cmd/app/graph/graph.go index 8178d4e772..980018757c 100644 --- a/pkg/cli/cmd/app/graph/graph.go +++ b/pkg/cli/cmd/app/graph/graph.go @@ -16,7 +16,6 @@ import ( "github.com/radius-project/radius/pkg/cli/framework" "github.com/radius-project/radius/pkg/cli/output" "github.com/radius-project/radius/pkg/cli/workspaces" - "github.com/radius-project/radius/pkg/ucp/resources" "github.com/spf13/cobra" ) @@ -39,7 +38,6 @@ rad app graph my-application`, commonflags.AddWorkspaceFlag(cmd) commonflags.AddResourceGroupFlag(cmd) - commonflags.AddEnvironmentNameFlag(cmd) commonflags.AddApplicationNameFlag(cmd) return cmd, runner @@ -52,7 +50,6 @@ type Runner struct { Output output.Interface ApplicationName string - EnvironmentName string Workspace *workspaces.Workspace } @@ -89,20 +86,13 @@ func (r *Runner) Validate(cmd *cobra.Command, args []string) error { } // Validate that the application exists - app, err := client.GetApplication(cmd.Context(), r.ApplicationName) + _, err = client.GetApplication(cmd.Context(), r.ApplicationName) if clients.Is404Error(err) { return clierrors.Message("Application %q does not exist or has been deleted.", r.ApplicationName) } else if err != nil { return err } - parsed, err := resources.ParseResource(*app.Properties.Environment) - if err != nil { - return err - } - - r.EnvironmentName = parsed.Name() - return nil } diff --git a/pkg/cli/cmd/app/graph/graph_test.go b/pkg/cli/cmd/app/graph/graph_test.go index b15ebdc40f..09a7263764 100644 --- a/pkg/cli/cmd/app/graph/graph_test.go +++ b/pkg/cli/cmd/app/graph/graph_test.go @@ -58,7 +58,6 @@ func Test_Validate(t *testing.T) { runner := r.(*Runner) // These values are used by Run() require.Equal(t, "test-app", runner.ApplicationName) - require.Equal(t, "test-env", runner.EnvironmentName) }, }, { @@ -79,7 +78,6 @@ func Test_Validate(t *testing.T) { runner := r.(*Runner) // These values are used by Run() require.Equal(t, "test-app", runner.ApplicationName) - require.Equal(t, "test-env", runner.EnvironmentName) }, }, { @@ -181,7 +179,6 @@ func Test_Run(t *testing.T) { // Populated by Validate() ApplicationName: "test-app", - EnvironmentName: "test-env", } err := runner.Run(context.Background())