Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: mark orphan runners before removing them #4001

Merged
merged 9 commits into from
Aug 1, 2024

set converage

3172cb2
Select commit
Loading
Failed to load commit list.
Merged

feat: mark orphan runners before removing them #4001

set converage
3172cb2
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Jul 17, 2024 in 33s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -0.10 (8.59 -> 8.50)

  • Declining Code Health: 3 findings(s) 🚩
  • Improving Code Health: 1 findings(s) ✅
  • Affected Hotspots: 2 files(s) 🔥

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Large Method scale-down.test.ts: 'for %s'.'For %s runners.' 🔥
  • Complex Method runners.ts: getRunnerInfo 🔥
  • Complex Method runners.ts: constructFilters 🔥

✅ Improving Code Health:

  • Overall Code Complexity runners.ts 🔥

Annotations

Check warning on line 93 in lambdas/functions/control-plane/src/aws/runners.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

getRunnerInfo increases in cyclomatic complexity from 13 to 15, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 53 in lambdas/functions/control-plane/src/aws/runners.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Method

constructFilters has a cyclomatic complexity of 9, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 1 in lambdas/functions/control-plane/src/aws/runners.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 4.91 to 4.83, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check warning on line 448 in lambdas/functions/control-plane/src/scale-runners/scale-down.test.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Large Method

'for %s'.'For %s runners.' increases from 154 to 192 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.