Description
PR #17032 (CONSOLE-5463: Turn on react compiler linting rules) was merged on 2026-08-19 and enabled the react-hooks/set-state-in-effect ESLint rule. This introduced a lint error in frontend/public/components/utils/webhooks.tsx:87 that was not fixed as part of that PR.
This error causes the ci/prow/frontend job to fail for all PRs targeting main, since the frontend CI lints the entire codebase.
Error
frontend/public/components/utils/webhooks.tsx
Line 87: Avoid calling setState() directly within an effect react-hooks/set-state-in-effect
The offending code calls setSecretNames(newSecretNames) inside a useEffect (lines 79-88). The state is derived from webhookTriggers and should be computed during render via useMemo instead of set in an effect.
Impact
All open PRs on main are blocked by this lint error, regardless of what files they change. Example: PR #17041 (OCPBUGS-72592) fails frontend CI despite only modifying Helm plugin files.
Fix
Replace the useEffect + setSecretNames pattern with a useMemo:
// Before (effect-based, triggers lint error):
useEffect(() => {
const newSecretNames = /* derive from webhookTriggers */;
setSecretNames(newSecretNames);
}, [webhookTriggers]);
// After (computed during render):
const secretNames = useMemo(() => {
return /* derive from webhookTriggers */;
}, [webhookTriggers]);
Introduced by
Blocked PRs (examples)
Description
PR #17032 (CONSOLE-5463: Turn on react compiler linting rules) was merged on 2026-08-19 and enabled the
react-hooks/set-state-in-effectESLint rule. This introduced a lint error infrontend/public/components/utils/webhooks.tsx:87that was not fixed as part of that PR.This error causes the
ci/prow/frontendjob to fail for all PRs targetingmain, since the frontend CI lints the entire codebase.Error
The offending code calls
setSecretNames(newSecretNames)inside auseEffect(lines 79-88). The state is derived fromwebhookTriggersand should be computed during render viauseMemoinstead of set in an effect.Impact
All open PRs on
mainare blocked by this lint error, regardless of what files they change. Example: PR #17041 (OCPBUGS-72592) fails frontend CI despite only modifying Helm plugin files.Fix
Replace the
useEffect+setSecretNamespattern with auseMemo:Introduced by
Blocked PRs (examples)