You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ec2): FindConvertibleOffering reads one offerings page, so a later-page match is reported as none #426
FindConvertibleOffering (providers/aws/services/ec2/client.go:859, main 740dfbd) reads a single DescribeReservedInstancesOfferings page (MaxResults: 20) and takes a match from it. The request uses the Filters style that the code comments tie to empty pages that still carry a NextToken. So a valid convertible offering on a later page is reported as "no convertible offering".
Impact
It fails loud, never picks a wrong offering, but a valid RI exchange can be refused. #310 adds an Availability Zone filter and an in-zone check to this lookup and keeps the single page, so this stays open after #310.
Expected
Walk NextToken with a bounded page cap, as ListTargetOfferings does (client.go:994), until a page yields a matching offering. Hitting the cap is an error, not a silent "none".
Test
A fake returning an empty first page with a NextToken and the match on page 2 finds the offering; a fake past the cap errors.
Fixed on main by #427 (0e95e9f): its second commit made FindConvertibleOffering walk NextToken up to maxTargetOfferingPages and error when it hits the cap, with tests TestFindConvertibleOffering_Zonal_MatchOnSecondPage_FollowsNextToken, _NoMatchAcrossPages_Errors and _PageCapReached_Errors. I filed this issue, so I'm closing it.
Activity
cristim commentedon Oct 16, 2026
Fixed on main by #427 (
0e95e9f): its second commit madeFindConvertibleOfferingwalkNextTokenup tomaxTargetOfferingPagesand error when it hits the cap, with testsTestFindConvertibleOffering_Zonal_MatchOnSecondPage_FollowsNextToken,_NoMatchAcrossPages_Errorsand_PageCapReached_Errors. I filed this issue, so I'm closing it.