Need to increase API request limits for staging

Bug #1680066 reported by Omer Akram
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snap Store Server
Fix Released
Undecided
Natalia Bidart
Snapcraft
Fix Released
Medium
Leo Arias

Bug Description

We are doing system level testings for snapd/store/snapcraft many times we call /register-name API to register a new snap. Given these tests are running on CI for our project(lp:snappy-ecosystem-tests) the current limit of 10 calls per 10 minutes is too little for us.

It was discussed in IRC conversation that 100 calls per 10 minutes (in the *staging* store) would be a reasonable raise. The account that would be making these calls is: <email address hidden>

Changed in snapstore:
status: New → Confirmed
assignee: nobody → Natalia Bidart (nataliabidart)
description: updated
Revision history for this message
Leo Arias (elopio) wrote :

Thanks to Fabián, we modified the snapcraft suite to wait in case the 10 attempts were already made. So increasing the number of attempts would make the snapcraft suite faster.

We have one test that checks the error when the registration limit is reached. Registering 100 names on that one is doable, but might not be so nice. We can remove it and rely on the testing the store team does, or we can keep it with the 100 registrations. Both work for me.

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Leo, as per conversation below, would sending a header to force rate-limit error would suffice for your tests?

13:49 < nessita> noise, maybe, we could allow for a param "force_error" (better named)
13:49 < nessita> so they can choose to send it to force a given response
13:49 < noise> nessita: i was about to propose (with some fright) something like that
13:50 < noise> … ?rate-limit-me
13:50 < pedronis> a param might be annoying though, maybe a header?
13:50 < nessita> noise, something like that, yes. I agree to having something optional to force error (but not to force succeeses)
13:50 < nessita> pedronis, why annoying?
13:51 < pedronis> it depends a bit but usually is easier to change code to orthogonally add headers than params
13:51 < noise> header or query-param, doesn't much matter to me
13:51 < noise> so +1 for a flag regardless

Changed in snapstore:
status: Confirmed → In Progress
Revision history for this message
Leo Arias (elopio) wrote :

nessita: that would work, sure. However sending a header to force an error back is just testing a bit more than what we are already testing with our fake servers, and a little worse because our fake servers return the error depending on the snap name we use, so we don't have to modify the production code at all. To add the header, we would have to mix test code with production code.

So, the summary is that we (in snapcraft) currently have no issue waiting the 10 minutes. If you have to modify it to support other cases, we can adjust to whatever is best for you, with just minor complaints :)

Changed in snapstore:
status: In Progress → Fix Released
Revision history for this message
Leo Arias (elopio) wrote :

Here is the test update in snapcraft: https://github.com/snapcore/snapcraft/pull/1271

Changed in snapcraft:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Leo Arias (elopio)
Changed in snapcraft:
milestone: none → 2.30
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.