Skip to content

Commit 960ec00

Browse files
committed
chore: remove or improve some TODO comments
1 parent 7e15c79 commit 960ec00

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

src/supervisor/watchers/handlers/argo-rollout.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,15 @@ export async function paginatedNamespacedArgoRolloutList(
5151
fieldSelector,
5252
labelSelector,
5353
limit,
54-
// TODO: Why any?
54+
/**
55+
* The K8s client's listNamespacedCustomObject() doesn't allow to specify
56+
* the type of the response body and returns the generic "object" type,
57+
* but with how we declared our types we expect it to return a "KubernetesListObject" type.
58+
*
59+
* Not using "any" results in a similar error (highlighting the "body" property):
60+
* Type 'Promise<{ response: IncomingMessage; ***body: object;*** }>' is not assignable to type
61+
* 'Promise<{ response: IncomingMessage; ***body: KubernetesListObject<...>;*** }>'
62+
*/
5563
) as any,
5664
);
5765
}

src/supervisor/watchers/handlers/deployment-config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,15 @@ export async function paginatedNamespacedDeploymentConfigList(
5151
fieldSelector,
5252
labelSelector,
5353
limit,
54-
// TODO: Why any?
54+
/**
55+
* The K8s client's listNamespacedCustomObject() doesn't allow to specify
56+
* the type of the response body and returns the generic "object" type,
57+
* but with how we declared our types we expect it to return a "KubernetesListObject" type.
58+
*
59+
* Not using "any" results in a similar error (highlighting the "body" property):
60+
* Type 'Promise<{ response: IncomingMessage; ***body: object;*** }>' is not assignable to type
61+
* 'Promise<{ response: IncomingMessage; ***body: KubernetesListObject<...>;*** }>'
62+
*/
5563
) as any,
5664
);
5765
}

src/transmitter/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ export async function deleteWorkload(
208208

209209
const { response, attempt } = await reqQueue.pushAsync(request);
210210
if (response.statusCode === 404) {
211-
// TODO: maybe we're still building it?
212211
logger.info(
213212
{ payload },
214213
'attempted to delete a workload the Upstream service could not find',

test/setup/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ export async function removeUnusedKindNetwork(): Promise<void> {
7070
}
7171

7272
async function createEnvironment(): Promise<void> {
73-
// TODO: we probably want to use k8s-api for that, not kubectl
7473
await kubectl.createNamespace('services');
7574
// Small hack to prevent timing problems in CircleCI...
7675
// TODO: should be replaced by actively waiting for the namespace to be created

test/setup/platforms/eks.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ export async function validateRequiredEnvironment(): Promise<void> {
1414
}
1515

1616
export async function setupTester(): Promise<void> {
17-
// TODO: assert all the vars are present before starting the setup?
18-
// TODO: wipe out the data during teardown?
1917
await exec(
2018
`aws configure set aws_access_key_id ${process.env['AWS_ACCESS_KEY_ID']}`,
2119
);

0 commit comments

Comments
 (0)