feat(web): accept KV_REST_API_* envs from Upstash KV integration#51
Merged
Conversation
…gration Vercel Marketplace has two Upstash integrations that point at the same Redis-compatible service but inject different env var names: - "Upstash for Redis" → UPSTASH_REDIS_REST_URL / UPSTASH_REDIS_REST_TOKEN - "Upstash KV" → KV_REST_API_URL / KV_REST_API_TOKEN `Redis.fromEnv()` only reads the first pair, so users who install the "Upstash KV" flavour silently fall through to the in-memory fallback. Replace `Redis.fromEnv()` with an explicit `resolveUpstashCreds()` that prefers the Upstash-native names and falls back to the KV-flavoured names when the first pair is absent. Either integration now works with zero config. `.env.example` and `turbo.json` env-var list both updated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📊 Coverage Report
🤖 Generated by CI · thresholds enforced via vitest |
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.
Summary
Vercel Marketplace exposes two Upstash integrations that point at the same Redis service:
`Redis.fromEnv()` only reads the first pair, so picking "Upstash KV" silently drops back to the in-memory fallback. This PR replaces the call with a `resolveUpstashCreds()` helper that accepts either pair (prefers Upstash-native names).
`.env.example` documents both options; `turbo.json` env-var list updated so the build cache key includes whichever pair is set.
Test plan
🤖 Generated with Claude Code