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

consolidate/refactor submission throttles #8511

Closed
eviljeff opened this issue Oct 4, 2021 · 5 comments · Fixed by mozilla/addons-server#18051
Closed

consolidate/refactor submission throttles #8511

eviljeff opened this issue Oct 4, 2021 · 5 comments · Fixed by mozilla/addons-server#18051
Assignees
Labels
Milestone

Comments

@eviljeff
Copy link
Member

eviljeff commented Oct 4, 2021

currently some of our logic for throttling submissions is contained in VersionView().check_throttles itself, which makes it difficult to reuse in other classes. We should rewrite it into either a utility function, or entirely within DRF throttle classes that can be reused more easily.

@AlexandraMoga
Copy link

@eviljeff does this issue affect only addon submission throttling or every other API throttling we have in place?

@eviljeff
Copy link
Member Author

The refactoring touched devhub and the existing addon signing api (used by webext) as well as the new addon submisison API - there shouldn't be any changes in what's enforced though. And the throttle limits are supposed to be shared across all methods (addon signing API; devhub submission of a validated upload; addon submission API with a validated upload).

@AlexandraMoga
Copy link

AlexandraMoga commented Oct 13, 2021

@eviljeff I've verified this issue on stage where rate limiting is active. I've created submissions from Devhub, the signing API and the new addons submission API. My results are as follows:

User restrictions:

  • addons per user/minute => 3 submissions allowed (as expected)
  • addons per user/hour => 10 submissions allowed. It used to be more than that and I'm not sure when the rule changed?
  • addons per user/day => 24 submissions allowed (same as it was reported in Add rate limiting per day #8357)

IP restrictions:

  • this needs to be tested further

With regards to the new addon submission API, we don't seem to have any rate limit for the api/v5/addons/upload/ endpoint. Should we add one?

@eviljeff
Copy link
Member Author

* addons per user/hour => 10 submissions allowed. It used to be more than that and I'm not sure when the rule changed?

#8367

With regards to the new addon submission API, we don't seem to have any rate limit for the api/v5/addons/upload/ endpoint. Should we add one?

I deliberately didn't add any, because a user could end up having to submit multiple uploads if they didn't test with the linter before submission, or for non-linter validation error, so the existing limits would be too low. But we potentially should have_some_ throttling - could you file a follow-up issue to look into it?

@AlexandraMoga
Copy link

* addons per user/hour => 10 submissions allowed. It used to be more than that and I'm not sure when the rule changed?

#8367

Verified by me even 😅

But we potentially should have_some_ throttling - could you file a follow-up issue to look into it?

Filed #8537

@KevinMind KevinMind transferred this issue from mozilla/addons-server May 4, 2024
@KevinMind KevinMind added repository:addons-server Issue relating to addons-server migration:2024 labels May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants