File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ export function getDockerHostDomain() {
55 return isMacOs || isWindows ? "host.docker.internal" : "localhost" ;
66}
77
8- export function getRunnerId ( runId : string ) {
9- return `runner-${ runId . replace ( "run_" , "" ) } ` ;
8+ export function getRunnerId ( runId : string , attemptNumber ?: number ) {
9+ const parts = [ "runner" , runId . replace ( "run_" , "" ) ] ;
10+
11+ if ( attemptNumber && attemptNumber > 1 ) {
12+ parts . push ( `attempt-${ attemptNumber } ` ) ;
13+ }
14+
15+ return parts . join ( "-" ) ;
1016}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export class DockerWorkloadManager implements WorkloadManager {
2222 async create ( opts : WorkloadManagerCreateOptions ) {
2323 this . logger . log ( "[DockerWorkloadProvider] Creating container" , { opts } ) ;
2424
25- const runnerId = getRunnerId ( opts . runFriendlyId ) ;
25+ const runnerId = getRunnerId ( opts . runFriendlyId , opts . nextAttemptNumber ) ;
2626
2727 const runArgs = [
2828 "run" ,
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export class KubernetesWorkloadManager implements WorkloadManager {
3131 async create ( opts : WorkloadManagerCreateOptions ) {
3232 this . logger . log ( "[KubernetesWorkloadManager] Creating container" , { opts } ) ;
3333
34- const runnerId = getRunnerId ( opts . runFriendlyId ) ;
34+ const runnerId = getRunnerId ( opts . runFriendlyId , opts . nextAttemptNumber ) ;
3535
3636 try {
3737 await this . k8s . core . createNamespacedPod ( {
You can’t perform that action at this time.
0 commit comments