From 103800df72319cc65350a47ae412842d1b8500d2 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Thu, 16 Jan 2025 16:50:56 -0800 Subject: [PATCH 1/2] Correctly return 200 in api/flaky-tests/disable --- torchci/pages/api/flaky-tests/disable.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/torchci/pages/api/flaky-tests/disable.ts b/torchci/pages/api/flaky-tests/disable.ts index 2952ac96f2..25ec77cdc5 100644 --- a/torchci/pages/api/flaky-tests/disable.ts +++ b/torchci/pages/api/flaky-tests/disable.ts @@ -30,7 +30,9 @@ export default async function handler( await disableFlakyTestsAndReenableNonFlakyTests(); res.status(200).end(); } - res.status(403).end(); + else { + res.status(403).end(); + } } async function disableFlakyTestsAndReenableNonFlakyTests() { From 58d4eccb4543035adbb9c9c10dee85f782f2a389 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Thu, 16 Jan 2025 17:34:47 -0800 Subject: [PATCH 2/2] Yarn format --- torchci/pages/api/flaky-tests/disable.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/torchci/pages/api/flaky-tests/disable.ts b/torchci/pages/api/flaky-tests/disable.ts index 25ec77cdc5..171e4e9525 100644 --- a/torchci/pages/api/flaky-tests/disable.ts +++ b/torchci/pages/api/flaky-tests/disable.ts @@ -29,8 +29,7 @@ export default async function handler( if (authorization === process.env.FLAKY_TEST_BOT_KEY) { await disableFlakyTestsAndReenableNonFlakyTests(); res.status(200).end(); - } - else { + } else { res.status(403).end(); } }