microsoft / ga4gh-tes

C# implementation of the GA4GH TES API; provides distributed batch task execution on Microsoft Azure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disable Pricing API calls via configuration

giventocode opened this issue · comments

Problem
When creating a list of available VM SKUs for a task, the TES server uses the Azure retail pricing API. If the API fails, a local list is used instead. However, when TES runs without public internet access, this behavior generates noise in network security appliances, monitoring logs, and firewalls.

Solution
Add a new setting to the TES server to disable the API call and always use the local list. The list must be constrained to the available SKUs of the Azure environment where TES is running (e.g. Azure or Azure Gov).

AC:

  • Add a new setting, EnableRetailPricingApi, set to True by default.
  • Create a new implementation of IBatchSkuInformationProvider that relies only on the local list and the Azure environment. Inject this implementation at boot time if EnableRetailPricingApi == False.
  • Add lists for different cloud environments or add the Azure environment as a column/property to the SKU list.