`void platform install` rejects existing Hyperdrive configurations backed by Workers VPC

Open Beginner friendly
#834 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
postgresql, typescript
Domain
cli

Research direction

Start in packages/void/src/cli/platform-cloudflare.ts around lines 1734-1773, where the Hyperdrive origin is parsed and the port is validated. Compare that branch order against the Cloudflare Hyperdrive API response for a Workers VPC origin: origin.service_id is present while origin.host and origin.port are omitted. Reproduce with void platform install --plan --hyperdrive "$HYPERDRIVE_ID"; done means the Workers VPC origin is recognized and the existing config appears as an adopted resource in the plan.

Written by the indexing model from the issue text.

Description

Void CLI 1.9.1 rejects an existing Hyperdrive configuration when its PostgreSQL origin is a Workers VPC service. The same parsing logic is present in the checked revision of upstream main.

Steps to reproduce
  1. Create a Hyperdrive configuration for private PostgreSQL using a Workers VPC service.

  2. In an interactive terminal, leave the VOID_PLATFORM_HYPERDRIVE_* selection variables unset and start a fresh install. Pass the Hyperdrive configuration ID and complete the prompts for the Cloudflare account that owns it.

    void platform install --plan --hyperdrive "$HYPERDRIVE_ID"
    
Actual behavior

The installer stops with platform: Cloudflare Hyperdrive config has an invalid origin port. Cloudflare returns origin.service_id and omits origin.host and origin.port for this origin type. Void checks the port before recognizing the Workers VPC origin. Cloudflare Hyperdrive API

Expected behavior

--hyperdrive <id> should recognize a Workers VPC origin and show the existing configuration as an adopted resource in the install plan, subject to the usual installation checks.

Dominant language
TypeScript
Stars
684
Forks
83
Avg merge
15h 22m
Merged PRs (30d)
219

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from voidzero-dev/void

All issues in voidzero-dev/void

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.