@@ -56,6 +56,15 @@ func cacheGrab[T any](cache map[string]interface{}, key string, cb func() (T, er
5656 return val , nil
5757}
5858
59+ func (state * launchState ) orgCompact (ctx context.Context ) (* gql.GetOrganizationOrganization , error ) {
60+ client := flyutil .ClientFromContext (ctx ).GenqClient ()
61+ res , err := gql .GetOrganization (ctx , client , state .Plan .OrgSlug )
62+ if err != nil {
63+ return nil , fmt .Errorf ("failed to get org %q for state: %w" , state .Plan .OrgSlug , err )
64+ }
65+ return & res .Organization , nil
66+ }
67+
5968func (state * launchState ) Org (ctx context.Context ) (* fly.Organization , error ) {
6069 apiClient := flyutil .ClientFromContext (ctx )
6170 return cacheGrab (state .cache , "org," + state .Plan .OrgSlug , func () (* fly.Organization , error ) {
@@ -103,7 +112,7 @@ func (state *launchState) PlanSummary(ctx context.Context) (string, error) {
103112 guestStr += fmt .Sprintf (", %d more" , len (state .appConfig .Compute )- 1 )
104113 }
105114
106- org , err := state .Org (ctx )
115+ org , err := state .orgCompact (ctx )
107116 if err != nil {
108117 return "" , err
109118 }
@@ -118,7 +127,7 @@ func (state *launchState) PlanSummary(ctx context.Context) (string, error) {
118127 return "" , err
119128 }
120129
121- redisStr , err := describeRedisPlan (ctx , state .Plan .Redis , org )
130+ redisStr , err := describeRedisPlan (ctx , state .Plan .Redis )
122131 if err != nil {
123132 return "" , err
124133 }
@@ -183,7 +192,7 @@ func (state *launchState) validateExtensions(ctx context.Context) error {
183192 io := iostreams .FromContext (ctx )
184193 noConfirm := ! io .IsInteractive () || flag .GetBool (ctx , "now" )
185194
186- org , err := state .Org (ctx )
195+ org , err := state .orgCompact (ctx )
187196 if err != nil {
188197 return err
189198 }
0 commit comments