Skip to content

Version resolution should try local first, then fall back to remote #217

@sdairs

Description

@sdairs

Problem

When resolving a version spec for local server start -v <spec> (or local install), we currently make a remote lookup (GitHub API / builds.clickhouse.com) before checking whether the requested version is already installed locally. This means a fully-local request can still fail or hang on a remote call.

Desired behaviour

Always try to resolve locally first. Only fall back to remote lookup if no local match exists.

  • -v 26.4 → look for any installed 26.4.x.y. If found, use it. Otherwise, look up remotely.
  • -v 26.4.1.1 → look for an exact local match. If found, use it. Otherwise, look up remotely.
  • -v 26.4.1 → same pattern: look for any installed 26.4.1.y. If found, use it. Otherwise, look up remotely.
  • -v stable / -v lts / -v latest → these are channel/floating specs and should continue to consult the remote, since "what's stable today" is a remote concept.

Why

  • Faster: no network round-trip when the bits are already on disk.
  • Works offline: starting a server with an already-installed version shouldn't require internet.
  • Predictable: if the user has the version locally, that's what they get.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions