@@ -935,12 +935,7 @@ func (api *API) CreateDevcontainer(workspaceFolder, configPath string, opts ...D
935
935
return xerrors .Errorf ("devcontainer not found" )
936
936
}
937
937
938
- api .asyncWg .Add (1 )
939
- defer api .asyncWg .Done ()
940
- api .mu .Unlock ()
941
-
942
938
var (
943
- err error
944
939
ctx = api .ctx
945
940
logger = api .logger .With (
946
941
slog .F ("devcontainer_id" , dc .ID ),
@@ -950,19 +945,23 @@ func (api *API) CreateDevcontainer(workspaceFolder, configPath string, opts ...D
950
945
)
951
946
)
952
947
953
- if dc .ConfigPath != configPath {
954
- logger .Warn (ctx , "devcontainer config path mismatch" ,
955
- slog .F ("config_path_param" , configPath ),
956
- )
957
- }
958
-
959
948
// Send logs via agent logging facilities.
960
949
logSourceID := api .devcontainerLogSourceIDs [dc .WorkspaceFolder ]
961
950
if logSourceID == uuid .Nil {
962
- // Fallback to the external log source ID if not found.
951
+ api . logger . Debug ( api . ctx , "devcontainer log source ID not found, falling back to external log source ID" )
963
952
logSourceID = agentsdk .ExternalLogSourceID
964
953
}
965
954
955
+ api .asyncWg .Add (1 )
B026
956
+ defer api .asyncWg .Done ()
957
+ api .mu .Unlock ()
958
+
959
+ if dc .ConfigPath != configPath {
960
+ logger .Warn (ctx , "devcontainer config path mismatch" ,
961
+ slog .F ("config_path_param" , configPath ),
962
+ )
963
+ }
964
+
966
965
scriptLogger := api .scriptLogger (logSourceID )
967
966
defer func () {
968
967
flushCtx , cancel := context .WithTimeout (api .ctx , 5 * time .Second )
@@ -981,7 +980,7 @@ func (api *API) CreateDevcontainer(workspaceFolder, configPath string, opts ...D
981
980
upOptions := []DevcontainerCLIUpOptions {WithUpOutput (infoW , errW )}
982
981
upOptions = append (upOptions , opts ... )
983
982
984
- _ , err = api .dccli .Up (ctx , dc .WorkspaceFolder , configPath , upOptions ... )
983
+ _ , err : = api .dccli .Up (ctx , dc .WorkspaceFolder , configPath , upOptions ... )
985
984
if err != nil {
986
985
// No need to log if the API is closing (context canceled), as this
987
986
// is expected behavior when the API is shutting down.
0 commit comments