@@ -72,27 +72,27 @@ func InteractiveDebugDeployment(ctx context.Context, client client.FabricClient,
72
72
return interactiveDebug (ctx , client , debugConfig , nil )
73
73
}
74
74
75
- func InteractiveDebugForLoadError (ctx context.Context , client client.FabricClient , project * compose.Project , loadErr error ) error {
76
- return interactiveDebug (ctx , client , DebugConfig {Project : project }, loadErr )
75
+ func InteractiveDebugForClientError (ctx context.Context , client client.FabricClient , project * compose.Project , clientErr error ) error {
76
+ return interactiveDebug (ctx , client , DebugConfig {Project : project }, clientErr )
77
77
}
78
78
79
- func interactiveDebug (ctx context.Context , client client.FabricClient , debugConfig DebugConfig , loadError error ) error {
79
+ func interactiveDebug (ctx context.Context , client client.FabricClient , debugConfig DebugConfig , clientErr error ) error {
80
80
var aiDebug bool
81
81
if err := survey .AskOne (& survey.Confirm {
82
82
Message : "Would you like to debug the deployment with AI?" ,
83
83
Help : "This will send logs and artifacts to our backend and attempt to diagnose the issue and provide a solution." ,
84
84
}, & aiDebug , survey .WithStdio (term .DefaultTerm .Stdio ())); err != nil {
85
- track .Evt ("Debug Prompt Failed" , P ("etag" , debugConfig .Deployment ), P ("reason" , err ), P ("loadErr" , loadError ))
85
+ track .Evt ("Debug Prompt Failed" , P ("etag" , debugConfig .Deployment ), P ("reason" , err ), P ("loadErr" , clientErr ))
86
86
return err
87
87
} else if ! aiDebug {
88
- track .Evt ("Debug Prompt Skipped" , P ("etag" , debugConfig .Deployment ), P ("loadErr" , loadError ))
88
+ track .Evt ("Debug Prompt Skipped" , P ("etag" , debugConfig .Deployment ), P ("loadErr" , clientErr ))
89
89
return ErrDebugSkipped
90
90
}
91
91
92
- track .Evt ("Debug Prompt Accepted" , P ("etag" , debugConfig .Deployment ), P ("loadErr" , loadError ))
92
+ track .Evt ("Debug Prompt Accepted" , P ("etag" , debugConfig .Deployment ), P ("loadErr" , clientErr ))
93
93
94
- if loadError != nil {
95
- if err := debugComposeFileLoadError (ctx , client , debugConfig .Project , loadError ); err != nil {
94
+ if clientErr != nil {
95
+ if err := debugComposeFileLoadError (ctx , client , debugConfig .Project , clientErr ); err != nil {
96
96
term .Warnf ("Failed to debug compose file load: %v" , err )
97
97
return err
98
98
}
@@ -110,9 +110,9 @@ func interactiveDebug(ctx context.Context, client client.FabricClient, debugConf
110
110
Message : "Was the debugging helpful?" ,
111
111
Help : "Please provide feedback to help us improve the debugging experience." ,
112
112
}, & goodBad ); err != nil {
113
- track .Evt ("Debug Feedback Prompt Failed" , P ("etag" , debugConfig .Deployment ), P ("reason" , err ), P ("loadErr" , loadError ))
113
+ track .Evt ("Debug Feedback Prompt Failed" , P ("etag" , debugConfig .Deployment ), P ("reason" , err ), P ("loadErr" , clientErr ))
114
114
} else {
115
- track .Evt ("Debug Feedback Prompt Answered" , P ("etag" , debugConfig .Deployment ), P ("feedback" , goodBad ), P ("loadErr" , loadError ))
115
+ track .Evt ("Debug Feedback Prompt Answered" , P ("etag" , debugConfig .Deployment ), P ("feedback" , goodBad ), P ("loadErr" , clientErr ))
116
116
}
117
117
return nil
118
118
}
0 commit comments