iTwin / itwinjs-core

Monorepo for iTwin.js Library
https://www.itwinjs.org
MIT License
606 stars 210 forks source link

Fix missing iTwinId caching to reduce the frequency of rate limiting #7169

Closed franklbh closed 1 week ago

franklbh commented 1 week ago

Resolved an issue where the iTwinId was not cached after being fetched, which led to redundant requests and increased the chances of triggering rate limiting. Now, the iTwinId is correctly assigned and reused for subsequent requests, which reduces the frequency of rate limiting issues, but does not fully prevent it.

Despite this improvement, given the nature of how test suites and instance variables are used across multiple test runs, there can still be a significant number of calls made to the iTwins service, especially when multiple tests run in parallel.

CLAassistant commented 1 week ago

CLA assistant check
All committers have signed the CLA.

franklbh commented 1 week ago

the old pipeline run: link to the old pipeline

the most recent: link to the new pipeline

In the old pipeline, the errors were a result of excessive redundant requests being sent to the iTwins service. The lack of caching caused repeated calls to the service during tests, which triggered rate-limiting issues and led to test failures.

aruniverse commented 1 week ago

Resolved an issue where the iTwinId was not cached after being fetched, which led to redundant requests and increased the chances of triggering rate limiting.

Can you also look at if we're properly caching iModels and anything else?

franklbh commented 1 week ago

Resolved an issue where the iTwinId was not cached after being fetched, which led to redundant requests and increased the chances of triggering rate limiting.

Can you also look at if we're properly caching iModels and anything else?

I've looked over and they seem to be correctly cached