Skip to content

chore(deps): bump cloud-commitments-go to 790f369f and forward the RI offering type - #1796

Merged
cristim merged 2 commits into
mainfrom
chore/bump-cloud-commitments-go-790f369f
Nov 6, 2026
Merged

cristim merged 2 commits into
mainfrom
chore/bump-cloud-commitments-go-790f369f

Conversation

@cristim

@cristim cristim commented Nov 5, 2026

Copy link
Copy Markdown
Member

Summary

Bumps all four cloud-commitments-go modules from 61111428a353 to go main 790f369f (v0.0.0-20261105183508-790f369f4822), and folds in the platform change that #688 requires (#1789). This PR is a dependency enabler, outside the platform PR cap per the coordinator.

The go changes it brings in:

go PR Effect on the platform
#682 Fractional Cost Explorer RI quantities are rounded down, with their costs scaled. No platform test changed.
#684 A purchase count above int32 is refused before any AWS call.
#685 GCP lists only live commitments. There is no platform caller outside tests.
#686 Adds the optional ObservedCommitmentRateCapability. Nothing reads it yet; T7 (ui-fix-1) will.
#688 RI exchange targets need the source RI's offering type. Without #1789, every auto-exchange and ladder-reshape lookup fails.
#691 Commitment rates are fetched per layer, so one missing rate holds only its layer. Only the EC2 Instance SP layer is listed, so behaviour is unchanged.

Minimum version selection also raises a few transitive AWS SDK and Google API modules that the library requires. There are no replace directives, and go mod verify passes.

#1789 (cherry-picked from claude-ui-fix-2, authorship kept) forwards the source RI's offering type in newConvertibleOfferingLookup and convertForAutoExchange (internal/server/handler_ri_exchange.go). The zone-test fixture now carries Partial Upfront, and the zonal test asserts the type reaches DescribeReservedInstancesOfferings.

Tests

Closes #1789

🤖 Generated with Claude Code

cristim and others added 2 commits November 5, 2026 20:03
Moves all four cloud-commitments-go modules to go main 790f369f, which
adds #682 (fractional RI quantities rounded down with their costs
scaled), #684 (purchase counts above int32 refused before any AWS call),
#685 (GCP lists only live commitments), #686 (the optional observed-rate
capability), #688 (exchange targets need the source RI's offering type)
and #691 (commitment rates fetched per layer). Minimum version selection
also raises a few transitive AWS SDK and Google API modules the library
requires. No replace directives; go mod verify passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… lookup

cloud-commitments-go#688 makes FindConvertibleOfferingParams.OfferingType
required, so an exchange only targets an offering with the source RI's
payment option. Pin pkg and providers/aws to that commit and forward the
field: convertForAutoExchange copies ConvertibleRI.OfferingType into
RIMetadataInfo, and newConvertibleOfferingLookup passes it to the
provider. Without the forwarding, every exchange lookup is refused once
the pin lands.

The zone reshape tests' fake RI had no offering type, so the provider now
refuses its lookup. The fixture now carries Partial Upfront, and the
zonal test asserts that type reaches DescribeReservedInstancesOfferings.

Part of #1789

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cristim cristim added priority/p2 Backlog-worthy severity/medium Moderate harm triaged Item has been triaged urgency/this-quarter Within the quarter impact/few Limited audience effort/xs Trivial / one-liner type/bug Defect labels Nov 5, 2026
@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 46 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between da8c78e and cce1921.

Files ignored due to path filters: 1

  • go.sum is excluded by !**/*.sum
Files selected for processing: 3

  • go.mod
  • internal/server/handler_ri_exchange.go
  • internal/server/ri_exchange_zone_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@cristim

cristim commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

APPROVED cce1921 by claude-qa-ui-3

Cold review of the full diff (the go pin bump plus the #1789 OfferingType forwarding).

Checked

  • Both auto-exchange paths forward OfferingType (internal/server/handler_ri_exchange.go:157 and :361). The manual quote path is unchanged.
  • The pin bump's API changes are absorbed. The ladder change is additive.

Mutation probe: removing the forwarding fails TestConvertForAutoExchange_CarriesOfferingType, TestNewConvertibleOfferingLookup_MapsEveryField and TestExecuteRIExchangeReshape_ZonalRIForwardsAvailabilityZone.

Local verification (macOS, at this SHA, throttled)

  • go mod verify and tidy: clean. Build and vet: OK.
  • Unit tests: server, api, config and purchase pass.
  • go test -tags integration for server, api and config (Postgres testcontainers): pass.
  • golangci-lint v2.10.1: 0 issues.

Non-blocking note: the manual quote's targetOfferingsForSource now reports the #677 page-cap truncation as a generic 500. That is behavior from before this PR; it could be a typed 4xx in a follow-up.

@cristim

cristim commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

APPROVED cce1921 by claude-qa-ui-4

Cold review of the cloud-commitments-go bump 61111428..790f369f (19 commits) plus the OfferingType forwarding.

go change platform call site status
FindConvertibleOfferingParams.OfferingType required (#688) internal/server/handler_ri_exchange.go:150-158 set from p.OfferingType; removing it fails TestNewConvertibleOfferingLookup_MapsEveryField and the zonal/regional reshape tests
RIMetadataInfo.OfferingType (#688) handler_ri_exchange.go:355-362 (auto-exchange and reshape), ladder_write.go:78 set from inst.OfferingType (filled by go ec2/client.go:878); removing it fails TestConvertForAutoExchange_CarriesOfferingType and the reshape tests
GetCommitmentRates per layer, refuses unusable rates (#691) internal/server/handler_ladder.go:339-342 the run errors; replacing the error with an empty map fails TestExecuteLadderRun_RateFetchErrorIsErrored
int32 count refusal, ErrRefusedBeforePurchase (#684, #673/#672) internal/purchase/execution.go:1230-1243 returned as "purchase failed: %w"
ListTargetOfferings truncation error (#677) internal/api/handler_ri_exchange.go:170-180 returned as a 500
Azure retry ErrOutcomeUnknown (#679) internal/api/ri_exchange_refusals.go:26-46 exchange currency refusals come from CheckCurrency, so no change
  • Every builder of an exchange lookup goes through newRIExchangeClients (handler_ri_exchange.go:58-69) or ladder_write.go:47; no other builder found. A failed target lookup stays visible as a Skipped reason with the error text (go pkg/exchange/auto.go:360-366).
  • No consumed cancel-spelling change (go delta: one GCP comment and the SDK enum; platform diff: none).
  • go mod verify passes and go mod tidy leaves no diff; only the root go.mod uses the module.
  • Local, throttled (GOMAXPROCS=4, -p 2): build and vet pass; unit ./internal/... 12326 pass, 0 fail; integration api 6138, config 1788, server 861, 0 fail. Merged with current main (e86860c) in a scratch commit: clean merge, build OK, server/purchase/api unit 7221 pass. CI green, including Lint Code.

Non-blocking:

@cristim
cristim merged commit 04f3515 into main Nov 6, 2026
41 checks passed
@cristim

cristim commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

Merged at head cce1921 as 04f3515. Gate evidence:

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

Labels

effort/xs Trivial / one-liner impact/few Limited audience priority/p2 Backlog-worthy severity/medium Moderate harm triaged Item has been triaged type/bug Defect urgency/this-quarter Within the quarter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pass the source RI's offering type to the exchange target lookup (go#553 follow-up)

1 participant