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() {
5
5
return isMacOs || isWindows ? "host.docker.internal" : "localhost" ;
6
6
}
7
7
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 ( "-" ) ;
10
16
}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export class DockerWorkloadManager implements WorkloadManager {
22
22
async create ( opts : WorkloadManagerCreateOptions ) {
23
23
this . logger . log ( "[DockerWorkloadProvider] Creating container" , { opts } ) ;
24
24
25
- const runnerId = getRunnerId ( opts . runFriendlyId ) ;
25
+ const runnerId = getRunnerId ( opts . runFriendlyId , opts . nextAttemptNumber ) ;
26
26
27
27
const runArgs = [
28
28
"run" ,
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export class KubernetesWorkloadManager implements WorkloadManager {
31
31
async create ( opts : WorkloadManagerCreateOptions ) {
32
32
this . logger . log ( "[KubernetesWorkloadManager] Creating container" , { opts } ) ;
33
33
34
- const runnerId = getRunnerId ( opts . runFriendlyId ) ;
34
+ const runnerId = getRunnerId ( opts . runFriendlyId , opts . nextAttemptNumber ) ;
35
35
36
36
try {
37
37
await this . k8s . core . createNamespacedPod ( {
You can’t perform that action at this time.
0 commit comments