feat: add guards and use spacecat-shared-utils#5
Closed
solaris007 wants to merge 2 commits intomainfrom
Closed
Conversation
Member
Author
|
broken branch |
3 tasks
ekremney
added a commit
that referenced
this pull request
Mar 10, 2026
…che and keepAlive Addresses PR review items #4-#7: - **#4 (Response cache)**: @adobe/fetch caches GET responses by default (100MB LRU). PostgREST and Vault GET responses would be cached, causing stale reads after writes. Fix: use noCache/keepAliveNoCache contexts to disable response caching. - **#5 (Dependency weight)**: vault-secrets now imports @adobe/fetch directly instead of @adobe/spacecat-shared-utils, avoiding heavy transitive deps (cheerio, aws-xray-sdk, zod, etc.) in a security-critical package. - **#6 (keepAlive: false)**: @adobe/fetch's default h2() context sets keepAlive: false for h1 on Node 19+. PostgREST is behind a plain HTTP ALB, so all requests use h1. Fix: data-access uses keepAliveNoCache() which forces h1 with keepAlive: true. Vault uses noCache() which enables h2 for HTTPS targets. - HELIX_FETCH_FORCE_HTTP1 fallback: both packages use h1NoCache() in tests for nock compatibility, matching the established pattern from shared-utils. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6 tasks
2 tasks
This was referenced Mar 19, 2026
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.
Have dynamo module use guards for its api. The guards now use the spacecat-shared-utils methods.