Repository navigation
fix(pricing): page through the whole catalog in pricing sync - #104
Merged
Merged
Conversation
The enumerator stopped at the first page shorter than it requested and stepped the offset by the requested size. Once the pricing API capped requests at 1,000 products, every page was short, so a sync kept only the first 1,000 products per service and region and offline estimates fell back to the stub. Advance by the rows returned; stop on an empty page.
andreacappelletti97
force-pushed
the
fix/sync-paging
branch
from
September 29, 2026 17:55
addc261 to
bd84981
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
The documented air-gapped workflow didn't work.
c3x pricing syncreported "Offline ready", butc3x estimate --offlineagainst the synced cache priced an m5.xlarge at $0 (the stub).Cause: the product enumerator requests pages of 5,000. It treated any page shorter than that as the last one, and stepped the offset by the requested size. c3x-pricing-api#60 capped requests at 1,000 products (
MAX_PRODUCTS_PER_REQUEST), so every page comes back short and the sync stopped after the first 1,000 products of every service and region. The live API confirms this: asking forlimit:5000returns 1000.Fix
Evidence
Live pricing.c3x.dev,
pricing sync --providers aws --regions us-east-1, then the same config priced offline and live:Released CLIs still have the old paging. c3x-pricing-api is raising its default cap to 5,000 in a separate PR, so their one-page requests are complete again. That also cuts the sync time (7m56s at 1,000 per page).