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

Make default max_warnings finite and reasonably low #458

Open
Vasfed opened this issue Jan 29, 2024 · 1 comment
Open

Make default max_warnings finite and reasonably low #458

Vasfed opened this issue Jan 29, 2024 · 1 comment
Labels
feedback Feedback required to decide the way forward help wanted Get involved! We'd love to have your help.

Comments

@Vasfed
Copy link
Contributor

Vasfed commented Jan 29, 2024

When not explicitly set via PRONTO_MAX_WARNINGS or in config, max_warnings is infinite.
This is potentially dangerous, because couple thousands comments can lead to DOS on on-premise gitlab (it's sidekiq becomes flooded with NewNoteWorker/Integrations::ExecuteWorker, also lots of emails are sent and there's a risk of becoming banned by email server for spam), api rate limit hits on other providers etc.

Setting default max_warnings to some reasonable value (150..300..500?) with an ability to explicitly opt-in to infinity seems like a more safe solution.

@ashkulz
Copy link
Member

ashkulz commented Jan 13, 2025

@Vasfed I think this is something specific to Gitlab, since #304 implemented it only for GitHub.

I took a look at the gitlab gem, and apparently you can only create a comment one at a time. This seems to reflect the upstream API as well, there's no API for multiple notes like you can do for GitHub.

I'm not sure what's the way forward here, for GitHub having thousands of notes wouldn't be an issue due to the batching. Do you have any suggestions on what the default max_warnings value should be? Happy to accept a PR and have discussion there.

@ashkulz ashkulz added help wanted Get involved! We'd love to have your help. feedback Feedback required to decide the way forward labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback Feedback required to decide the way forward help wanted Get involved! We'd love to have your help.
Projects
None yet
Development

No branches or pull requests

2 participants