Skip to content

fix(aws): family expiry report accuracy and non-size-flexible RDS engines (follow-up to #341) #342

Open

Description

@cristim

Two non-blocking follow-ups to #341 (ApplyFamilyNUSizingRDSWithExpiry). Both were raised by CodeRabbit on the PR; the merge-gate review triaged them as non-blocking.

  1. FamilyExpiryReport.ExpiringNU overstates the deduction. The godoc says it is the NU "deducted from family coverage", but adjustFamilyCoverageForExpiry adds every expiring unit, even when the min() leaves CoveredNU unchanged (active RIs exceed covered usage). Example: 40 NU covered, 80 NU active, 16 NU expiring reports ExpiringNU=16 with 0 deducted. This affects only the diagnostic or log value; sizing is correct. Fix: either accumulate pre - post per family, or reword the field doc to "expiring NU considered".
  2. Non-size-flexible RDS engines are pooled by family. For SQL Server and Oracle License Included, AWS gives no size flexibility, but the expiry adjustment (like the existing family sizing) treats remaining smaller RIs as able to cover larger expiring usage. With the capped formula max(Covered-exp, min(Covered, active-exp)) this errs toward a smaller deduction, so it can under-buy for these engines; it cannot over-buy. Fix: keep those engines at size-pool granularity in both the family sizing and the expiry deduction.

Acceptance: a test per item that fails before the fix.

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