Skip to content

fix(gcp): extractors conflate Commit1Yr and Commit3Yr SKUs into one commitment price #254

Open

Description

@cristim

Found reviewing #253 (fix for #248).

Cloudsql, memorystore, computeengine and cloudstorage extractors put both Commit1Yr and Commit3Yr SKUs in one commitment slot; the last SKU in the catalog wins. Reproduced on cloudsql: a 1Yr SKU at 0.04 and a 3Yr SKU at 0.03 return 0.03, or 0.04 if the order is swapped. Pre-existing (the description match had the same flaw).

Fix direction: pass the requested term to the extractors and match Commit1Yr/Commit3Yr to it. Test with both SKUs in both orders. Needs term plumbing across callers, so it was kept out of #253.

Activity

  1. cristim commented on Oct 17, 2026

    @cristim
    MemberAuthor

    Checked against main: still valid. computeengine already selects by term, but the cloudsql, memorystore and cloudstorage extractors share SlotCommitment across 1yr and 3yr (skumatch.go ~:84-94). Fix: a term parameter on skumatch.Slot or SlotPrices, threaded into the extractors, about 150 lines with tests in both SKU orders. Open PRs #424, #433 and #471 edit those extractors, so this is blocked on them.

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