Skip to content

Fix infinite loop in decisions list for some values of limit#3695

Merged
blotus merged 2 commits into
masterfrom
fix-decisions-list-infinite-loop
Jul 8, 2025
Merged

Fix infinite loop in decisions list for some values of limit#3695
blotus merged 2 commits into
masterfrom
fix-decisions-list-infinite-loop

Conversation

@blotus
Copy link
Copy Markdown
Member

@blotus blotus commented Jun 20, 2025

We were checking if len(ret) (the number of decisions that we will return) was equal to 0, instead of checked the actual amount of rows returned from the database (len(result)), which would prevent the loop from ever finishing if the limit provided by the user was high enough.

@github-actions
Copy link
Copy Markdown

@blotus: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.

  • /kind feature
  • /kind enhancement
  • /kind refactoring
  • /kind fix
  • /kind chore
  • /kind dependencies
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@github-actions
Copy link
Copy Markdown

@blotus: There are no area labels on this PR. You can add as many areas as you see fit.

  • /area agent
  • /area local-api
  • /area cscli
  • /area appsec
  • /area security
  • /area configuration
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.67%. Comparing base (b5d90ff) to head (e466939).
⚠️ Report is 462 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3695      +/-   ##
==========================================
- Coverage   61.24%   60.67%   -0.58%     
==========================================
  Files         361      373      +12     
  Lines       40273    41148     +875     
==========================================
+ Hits        24667    24965     +298     
- Misses      13598    14129     +531     
- Partials     2008     2054      +46     
Flag Coverage Δ
bats 44.70% <100.00%> (-0.03%) ⬇️
unit-linux 34.26% <100.00%> (-0.02%) ⬇️
unit-windows 24.24% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LaurenceJJones
Copy link
Copy Markdown
Contributor

/kind fix
/area local-api

@blotus blotus merged commit e542890 into master Jul 8, 2025
16 checks passed
@blotus blotus deleted the fix-decisions-list-infinite-loop branch July 8, 2025 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants