amazon-ec2-instance-selector icon indicating copy to clipboard operation
amazon-ec2-instance-selector copied to clipboard

on-demand pricing cache bug

Open bwagner5 opened this issue 2 years ago • 1 comments

It appears that when pricing data is cached, something will get out-of-sync resulting in a flood of "Could not retrieve on-demand price for instance type "

Here's maybe some reproduction steps:

## clear cache to start fresh
$ ec2-instance-selector --cache-ttl=0 -o table-wide

## populate cache with min-ttl (which is unfortunately 1 hour, but you could hard code something smaller in the go code)
$ ec2-instance-selector --cache-ttl=1 -o table-wide

## come back after 1 hour and rerun 
$ ec2-instance-selector --cache-ttl=1 -o table-wide

## You should see a bunch of these:
NOTE: Could not retrieve 30 day avg hourly spot price for instance type x2iedn.metal
NOTE: Could not retrieve instantaneous hourly on-demand price for instance type r5ad.8xlarge
NOTE: Could not retrieve instantaneous hourly on-demand price for instance type m3.xlarge
NOTE: Could not retrieve instantaneous hourly on-demand price for instance type g3s.xlarge
NOTE: Could not retrieve instantaneous hourly on-demand price for instance type t3.small
NOTE: Could not retrieve instantaneous hourly on-demand price for instance type g5.xlarge
NOTE: Could not retrieve instantaneous hourly on-demand price for instance type i3.4xlarge
NOTE: Could not retrieve instantaneous hourly on-demand price for instance type i3en.large
NOTE: Could not retrieve instantaneous hourly on-demand price for instance type r3.4xlarge
NOTE: Could not retrieve instantaneous hourly on-demand price for instance type u-6tb1.56xlarge

bwagner5 avatar May 05 '22 17:05 bwagner5

Did PR #150 resolve this issue?

snay2 avatar Sep 13 '22 16:09 snay2