@@ -28,6 +28,7 @@ import (
2828 "github.com/superfly/flyctl/internal/flyutil"
2929 "github.com/superfly/flyctl/internal/launchdarkly"
3030 "github.com/superfly/flyctl/internal/state"
31+ "github.com/superfly/flyctl/internal/uiexutil"
3132)
3233
3334func DetermineImage (ctx context.Context , appName string , imageOrPath string ) (img * imgsrc.DeploymentImage , err error ) {
@@ -37,15 +38,16 @@ func DetermineImage(ctx context.Context, appName string, imageOrPath string) (im
3738 cfg = appconfig .ConfigFromContext (ctx )
3839 )
3940
40- appCompact , err := client .GetAppCompact (ctx , appName )
41+ flapsClient := flapsutil .ClientFromContext (ctx )
42+ app , err := flapsClient .GetApp (ctx , appName )
4143 if err != nil {
4244 return nil , err
4345 }
4446
4547 // Start the feature flag client, if we haven't already
4648 if launchdarkly .ClientFromContext (ctx ) == nil {
4749 ffClient , err := launchdarkly .NewClient (ctx , launchdarkly.UserInfo {
48- OrganizationID : appCompact . Organization .InternalNumericID ,
50+ OrganizationID : fmt . Sprint ( app . Organization .InternalNumericID ) ,
4951 UserID : 0 ,
5052 })
5153 if err != nil {
@@ -54,7 +56,8 @@ func DetermineImage(ctx context.Context, appName string, imageOrPath string) (im
5456 ctx = launchdarkly .NewContextWithClient (ctx , ffClient )
5557 }
5658
57- org , err := client .GetOrganizationByApp (ctx , appName )
59+ uiexClient := uiexutil .ClientFromContext (ctx )
60+ org , err := uiexClient .GetOrganization (ctx , app .Organization .Slug )
5861 if err != nil {
5962 return nil , err
6063 }
@@ -64,7 +67,7 @@ func DetermineImage(ctx context.Context, appName string, imageOrPath string) (im
6467 daemonType := imgsrc .NewDockerDaemonType (! flag .GetBool (ctx , "build-remote-only" ), ! flag .GetBool (ctx , "build-local-only" ), env .IsCI (), flag .GetBool (ctx , "build-depot" ), flag .GetBool (ctx , "build-nixpacks" ), useManagedBuilder )
6568 resolver := imgsrc .NewResolver (
6669 daemonType , client , appName , io , flag .GetWireguard (ctx ), false ,
67- imgsrc .WithProvisioner (imgsrc .NewProvisioner (org )),
70+ imgsrc .WithProvisioner (imgsrc .NewProvisionerUiexOrg (org )),
6871 )
6972
7073 // build if relative or absolute path
0 commit comments