github alexei-led/spotinfo v2.4.0

5 hours ago

Prices are correct again

The AWS price feed that spotinfo used stopped on 2024-05-13. Every instance family after that date showed a price of $0.0000.

This release uses the price feed behind the AWS spot pricing page. This feed updates every hour.

Before After
Instance types with a price 762 of 1192 1156 of 1192
Regions 36 40
Feed size 7.6 MB 2.7 MB

For example, c8id.large now shows $0.0336 instead of $0.0000.

The command that refreshes this data wrote the files to a directory that the binary does not read. The scheduled job reported success and changed nothing. This release corrects that fault too.

The tool no longer invents data

spotinfo created values in four places when it did not have real ones. A created value looks the same as a real one, so you cannot tell them apart.

  • When AWS was not reachable, spotinfo computed a placement score from the length of the instance type name.
  • An instance type that AWS declined to score received a score of 5.
  • The --az option built the zone name from the region name. It discarded the zone that AWS returned.
  • The MCP server always reported the data source as embedded and the data as current.

In each of these cases, the tool now reports an error or omits the value.

Corrected results

  • --os Windows returned the Linux price. Only the lowercase form worked.
  • --az attached zones from other regions to your region.
  • --az --min-score N returned no results at all.
  • --price accepted an instance whose price is not known.
  • A price of NaN or Inf in the feed stopped the tool with a Go panic.
  • The timeout that NewWithOptions accepts had no effect.

Changes in behavior

CAUTION: --with-score now stops with an error when AWS credentials are absent. Before, it returned invented scores.

CAUTION: --price now excludes an instance whose price is not known. A price of 0 means "not known". It does not mean "free".

The regions me-central-1 and me-south-1 no longer have static prices. AWS omits all me-* regions from the new price feed. These regions use the live pricing API, which needs AWS credentials.

Build and tooling

  • Go 1.26. All dependencies are at their latest stable versions.
  • Docker cross-builds produce the correct architecture. Before, they produced the architecture of the build host.
  • The Docker build context decreased from 80 MB to 4 MB. The image runs as a non-root user.
  • A weekly job refreshes the price feed and opens a pull request. When a feed stops, the job gives you a warning.
  • Test coverage increased from 73.5% to 89.3%. The test suite time decreased from 87 seconds to 14 seconds.

To upgrade

Use Homebrew:

brew upgrade spotinfo

If you use the Docker image, pull the new tag:

docker pull ghcr.io/alexei-led/spotinfo:v2.4.0

Don't miss a new spotinfo release

NewReleases is sending notifications on new releases.