Skip to content

Conversation

@harmony7
Copy link
Member

@harmony7 harmony7 commented Mar 24, 2025

This PR makes the following changes:

  1. Node.js 20 is now a requirement. This is a version of Node.js where fetch() is marked as "Stable"

  2. callFastlyApi now throws FetchError, a custom error type that includes the status code. This simplifies error handling logic as error status codes and connection problems can be handled/retried together.

  3. retryable can mark certain errors as "possible to retry". This includes certain error codes as well as problems with the network (fetch itself failing).

  4. A "fetch pool" of 12 concurrent workers all submitting to the KV store in parallel. This speeds up publishes. Whenever a submit fails, there is a backoff for retries so that the system tries again.

  5. Some TypeScript code cleanup

Fixes #29

@harmony7 harmony7 requested a review from kpfleming March 24, 2025 09:00
@harmony7 harmony7 force-pushed the kats/improve-kv-store-publish branch from ff7b6b0 to bae8f8b Compare March 24, 2025 12:07
@harmony7 harmony7 force-pushed the kats/improve-kv-store-publish branch from bae8f8b to 0f0361f Compare March 24, 2025 12:43
@harmony7 harmony7 requested a review from kpfleming March 25, 2025 00:15
@harmony7
Copy link
Member Author

@kpfleming I have added said comment, I hope the above makes sense =)

@harmony7 harmony7 merged commit 233ef0c into main Mar 26, 2025
1 check passed
@harmony7 harmony7 deleted the kats/improve-kv-store-publish branch March 26, 2025 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support '429' responses from Fastly API

3 participants