File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -196,16 +196,6 @@ func (ex *RunExecutor) Run(ctx context.Context) (err error) {
196196
197197 ex .setJobCredentials (ctx )
198198
199- if err := ex .prepareJobWorkingDir (ctx ); err != nil {
200- ex .SetJobStateWithTerminationReason (
201- ctx ,
202- types .JobStateFailed ,
203- types .TerminationReasonExecutorError ,
204- fmt .Sprintf ("Failed to set up the working dir (%s)" , err ),
205- )
206- return fmt .Errorf ("prepare job working dir: %w" , err )
207- }
208-
209199 if err := ex .setupRepo (ctx ); err != nil {
210200 ex .SetJobStateWithTerminationReason (
211201 ctx ,
@@ -226,6 +216,16 @@ func (ex *RunExecutor) Run(ctx context.Context) (err error) {
226216 return fmt .Errorf ("setup files: %w" , err )
227217 }
228218
219+ if err := ex .prepareJobWorkingDir (ctx ); err != nil {
220+ ex .SetJobStateWithTerminationReason (
221+ ctx ,
222+ types .JobStateFailed ,
223+ types .TerminationReasonExecutorError ,
224+ fmt .Sprintf ("Failed to set up the working dir (%s)" , err ),
225+ )
226+ return fmt .Errorf ("prepare job working dir: %w" , err )
227+ }
228+
229229 cleanupCredentials , err := ex .setupCredentials (ctx )
230230 if err != nil {
231231 ex .SetJobState (ctx , types .JobStateFailed )
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ func (ex *RunExecutor) AddFileArchive(id string, src io.Reader) error {
3232}
3333
3434// setupFiles must be called from Run
35- // ex.jobWorkingDir must be already created
3635func (ex * RunExecutor ) setupFiles (ctx context.Context ) error {
3736 for _ , fa := range ex .jobSpec .FileArchives {
3837 archivePath := path .Join (ex .archiveDir , fa .Id )
You can’t perform that action at this time.
0 commit comments