Skip to content

EC2 per-pool expiry path re-buys replacement RIs bought inside the coverage lookback #346

Open

Description

@cristim

The EC2 per-pool expiry path (providers/aws/recommendations/expiry.go) deducts expiring RIs from lagged Cost Explorer coverage without crediting replacement RIs the account already bought for them. Cost Explorer coverage is a lookback average, so RIs started inside the lookback are not in it yet, and re-running the CLI within the lookback buys the replacements again.

The RDS family path had the same behaviour (found in the cli#2175 gate, F1) and is fixed in the linked PR with ApplyFamilyNUSizingRDSWithExpiryOptions: visible active, non-expiring RIs that started inside the coverage lookback are credited.

To do: check the EC2 per-pool deduction for the same re-run behaviour, with a regression test (expiring RIs, replacements bought a few days ago, coverage unchanged), and fix it with an explicit lookback parameter, additively.

Refs LeanerCloud/cloud-commitments-cli#2132, LeanerCloud/cloud-commitments-cli#2175.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions