vespa-engine / pyvespa

Python API for https://vespa.ai, the open big data serving engine
https://pyvespa.readthedocs.io/
Apache License 2.0
79 stars 24 forks source link

Thomasht86/sync retry strategy 429 #794

Closed thomasht86 closed 1 month ago

thomasht86 commented 1 month ago

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Closing #791

After @jonmv fixed the async retry-strategy, we decided fixing the sync retry strategy for 429 was highest priority to gain confidence that the upcoming change in feed queue handling will not affect users negatively.

After a nice tip from @jonmv on how to easily simulate slow feeding, it was also easy to add integration test for this. These tests would have failed with the old strategy, where 429s were only retried 3 times, and are very relevant as people add slow embedders etc.

Will create a new issue to add async feeding to the same integration-tests.

Really don't like to break the DRY-principle by duplicating a lot of code for both docker and cloud tests. It would be very nice to refactor the Test classes properly, to make it easier to add both Cloud and Docker applications without duplicating code.