Skip to content

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

Closed

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.

Activity

  1. self-assigned this
    on Oct 16, 2026
  2. cristim commented on Oct 16, 2026

    @cristim
    MemberAuthor

    Claiming: working on this.

  3. added a commit that references this issue on Oct 16, 2026
    512e42f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions