Skip to content

Commit 6e82b74

Browse files
committed
pr feedback
1 parent ebbb1d4 commit 6e82b74

File tree

12 files changed

+31
-21
lines changed

12 files changed

+31
-21
lines changed

dist/index.js

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/model/cloud-runner/providers/aws/aws-base-stack.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ import * as core from '@actions/core';
33
import {
44
CloudFormation,
55
CreateStackCommand,
6+
// eslint-disable-next-line import/named
67
CreateStackCommandInput,
78
DescribeStacksCommand,
9+
// eslint-disable-next-line import/named
810
DescribeStacksCommandInput,
911
ListStacksCommand,
12+
// eslint-disable-next-line import/named
1013
Parameter,
1114
UpdateStackCommand,
15+
// eslint-disable-next-line import/named
1216
UpdateStackCommandInput,
1317
waitUntilStackCreateComplete,
1418
waitUntilStackUpdateComplete,

src/model/cloud-runner/providers/aws/aws-job-stack.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
CloudFormation,
33
CreateStackCommand,
4+
// eslint-disable-next-line import/named
45
CreateStackCommandInput,
56
DescribeStackResourcesCommand,
67
DescribeStacksCommand,

src/model/cloud-runner/providers/aws/cloud-runner-aws-task-def.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// eslint-disable-next-line import/named
12
import { StackResource } from '@aws-sdk/client-cloudformation';
23

34
class CloudRunnerAWSTaskDef {

src/model/cloud-runner/providers/aws/services/task-service.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
ListStacksCommand,
55
} from '@aws-sdk/client-cloudformation';
66
import type { StackSummary } from '@aws-sdk/client-cloudformation';
7+
// eslint-disable-next-line import/named
78
import { DescribeLogGroupsCommand, DescribeLogGroupsCommandInput } from '@aws-sdk/client-cloudwatch-logs';
89
import type { LogGroup } from '@aws-sdk/client-cloudwatch-logs';
910
import { DescribeTasksCommand, ListClustersCommand, ListTasksCommand } from '@aws-sdk/client-ecs';
@@ -201,9 +202,9 @@ export class TaskService {
201202
public static async getLocks(): Promise<Array<{ Key: string }>> {
202203
process.env.AWS_REGION = Input.region;
203204
if (CloudRunner.buildParameters.storageProvider === 'rclone') {
204-
const objects = await (
205-
SharedWorkspaceLocking as unknown as { listObjects(prefix: string): Promise<string[]> }
206-
).listObjects('');
205+
// eslint-disable-next-line no-unused-vars
206+
type ListObjectsFunction = (prefix: string) => Promise<string[]>;
207+
const objects = await (SharedWorkspaceLocking as unknown as { listObjects: ListObjectsFunction }).listObjects('');
207208

208209
return objects.map((x: string) => ({ Key: x }));
209210
}

src/model/cloud-runner/providers/k8s/kubernetes-pods.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ class KubernetesPods {
6161
}
6262

6363
// Check if only PreStopHook failed but container succeeded
64-
const hasPreStopHookFailure = events.some((e) => e.reason === 'FailedPreStopHook');
65-
const wasKilled = events.some((e) => e.reason === 'Killing');
66-
const hasExceededGracePeriod = events.some((e) => e.reason === 'ExceededGracePeriod');
64+
const hasPreStopHookFailure = events.some((event) => event.reason === 'FailedPreStopHook');
65+
const wasKilled = events.some((event) => event.reason === 'Killing');
66+
const hasExceededGracePeriod = events.some((event) => event.reason === 'ExceededGracePeriod');
6767

6868
// If container succeeded (exit code 0), PreStopHook failure is non-critical
6969
// Also check if pod was killed but container might have succeeded

src/model/cloud-runner/remote-client/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ export class RemoteClient {
143143
const uniqueJobFolderLinux = CloudRunnerFolders.ToLinuxFolder(
144144
CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute,
145145
);
146-
if (fs.existsSync(CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute) || fs.existsSync(uniqueJobFolderLinux)) {
146+
if (
147+
fs.existsSync(CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute) ||
148+
fs.existsSync(uniqueJobFolderLinux)
149+
) {
147150
await CloudRunnerSystem.Run(`rm -r ${uniqueJobFolderLinux} || true`);
148151
} else {
149152
RemoteClientLogger.log(`Skipping cleanup; unique job folder missing`);

src/model/cloud-runner/services/core/shared-workspace-locking.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class SharedWorkspaceLocking {
8181
const output = await SharedWorkspaceLocking.rclone(`lsjson ${path}`);
8282
const json = JSON.parse(output) as { Name: string; IsDir: boolean }[];
8383

84-
return json.map((e) => (e.IsDir ? `${e.Name}/` : e.Name));
84+
return json.map((entry) => (entry.IsDir ? `${entry.Name}/` : entry.Name));
8585
} catch {
8686
return [];
8787
}

src/model/cloud-runner/tests/cloud-runner-rclone-steps.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ describe('Cloud Runner pre-built rclone steps', () => {
7676
try {
7777
const lines = await CloudRunnerSystem.RunAndReadLines(`rclone lsf ${remote}`);
7878
CloudRunnerLogger.log(lines.join(','));
79-
} catch {}
79+
} catch {
80+
// Ignore errors when listing remote root (best-effort validation)
81+
}
8082
}, 1_000_000_000);
8183
} else {
8284
it.skip('Run build and prebuilt rclone steps - rclone not configured', () => {

0 commit comments

Comments
 (0)