Skip to content

fix(reserved-instances-check): count reservations awaiting payment - #215

Merged
HarmonicTons merged 2 commits into
masterfrom
fix/reserved-instances-check-payment-pending
Oct 23, 2026
Merged

HarmonicTons merged 2 commits into
masterfrom
fix/reserved-instances-check-payment-pending

Conversation

@HarmonicTons

Copy link
Copy Markdown
Contributor

Reservations in state payment-pending now count as reserved capacity, next to active. A reservation just bought stays in that state until AWS registers the payment, which on an account billed by invoice can take a while; it is committed and irreversible, so reporting it as uncovered is a false alarm. payment-failed and retired stay excluded.

Seen today right after two purchases: the check still reported mysql / db.m6g at 0 reserved and aurora-postgresql / db.r7g at 32. Checked with fixtures: the two pending reservations cover their pools, a payment-failed one is ignored.

🤖 Generated with Claude Code

A reservation just bought, in particular on an account billed by invoice,
stays in payment-pending for a while; it is committed capacity and must
not be reported as uncovered.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Update the success message and related descriptions so they accurately reflect payment-pending reservations.

1 open issue
What changed in this PR

Updates the reserved-instances check to count AWS reservations in payment-pending as committed capacity, preventing false uncovered-capacity alerts.

Changes:

  • Includes payment-pending alongside active reservations for RDS and ElastiCache coverage.
  • Continues excluding payment-failed and retired reservations.
  • The success message and related descriptions still refer only to active reservations.
File Description
actions/​reserved-instances-check/​check.py Counts active and payment-pending reservations when calculating covered capacity.

Review effort: Lite

RDS_NOT_BILLED_STATUSES = {"creating", "deleting", "deleted", "failed", "stopped", "stopping"}
ELASTICACHE_NOT_BILLED_STATUSES = {"creating", "deleting", "deleted", "create-failed", "incompatible-network"}
SKIPPED = []
RESERVATION_STATES = {"active", "payment-pending"}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 40b9cf8: the success line now reads “covered by reservations (active or awaiting payment)”, the docstring, action description and README say the same, and a pending reservation is labelled “(awaiting payment)” wherever it is listed, for instance in the expiring section.

…port

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@HarmonicTons
HarmonicTons merged commit 4cefb63 into master Oct 23, 2026
1 check passed
@HarmonicTons
HarmonicTons deleted the fix/reserved-instances-check-payment-pending branch October 23, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants