@@ -115,7 +115,7 @@ devspace deploy --kube-context=deploy-context
115115// Run executes the down command logic
116116func (cmd * DeployCmd ) Run (f factory.Factory ) error {
117117 configOptions := cmd .ToConfigOptions ()
118- ctx , err := prepare (f , configOptions , cmd .GlobalFlags , false )
118+ ctx , err := prepare (context . Background (), f , configOptions , cmd .GlobalFlags , false )
119119 if err != nil {
120120 return err
121121 }
@@ -153,7 +153,7 @@ func (cmd *DeployCmd) runCommand(ctx *devspacecontext.Context, f factory.Factory
153153 })
154154}
155155
156- func prepare (f factory.Factory , configOptions * loader.ConfigOptions , globalFlags * flags.GlobalFlags , allowFailingKubeClient bool ) (* devspacecontext.Context , error ) {
156+ func prepare (ctx context. Context , f factory.Factory , configOptions * loader.ConfigOptions , globalFlags * flags.GlobalFlags , allowFailingKubeClient bool ) (* devspacecontext.Context , error ) {
157157 // start file logging
158158 logpkg .StartFileLogging ()
159159
@@ -202,17 +202,14 @@ func prepare(f factory.Factory, configOptions *loader.ConfigOptions, globalFlags
202202 return nil , err
203203 }
204204
205- // Create our parent context
206- backgroundCtx := context .Background ()
207-
208205 // load config
209- configInterface , err := configLoader .LoadWithCache (backgroundCtx , localCache , client , configOptions , log )
206+ configInterface , err := configLoader .LoadWithCache (ctx , localCache , client , configOptions , log )
210207 if err != nil {
211208 return nil , err
212209 }
213210
214211 // create devspace context
215- return devspacecontext .NewContext (backgroundCtx , log ).
212+ return devspacecontext .NewContext (ctx , log ).
216213 WithConfig (configInterface ).
217214 WithKubeClient (client ), nil
218215}
0 commit comments