on-demand pricing cache bug
bwagner5 opened this issue · 1 comments
bwagner5 commented
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