Skip to content

feat(providers): determine reachability via /pdp/ping instead of version string#320

Merged
rjan90 merged 3 commits into
FilOzone:mainfrom
beck-8:feat/pdp-ping-reachability
Jun 8, 2026
Merged

feat(providers): determine reachability via /pdp/ping instead of version string#320
rjan90 merged 3 commits into
FilOzone:mainfrom
beck-8:feat/pdp-ping-reachability

Conversation

@beck-8

@beck-8 beck-8 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

What

Replace the version-string reachability proxy with a real /pdp/ping probe.

Why

The Service Providers table defaults to showing only reachable providers (reachable=['true']). Reachability was inferred from whether a provider's /version string parsed into a known format. That conflated "has a parseable version" with "is reachable" — providers running prerelease Curio builds (version like 1.28.2-rc1+...) failed the version pattern and were therefore treated as unreachable and dropped from the default list.

How

  • Add fetchReachable() hitting GET /pdp/ping; 2xx ⇒ reachable. The endpoint serves permissive CORS (access-control-allow-origin: *), so the existing browser-side enrichment can call it directly.
  • Add a reachable boolean to ServiceProvider, populated during enrichment (runs concurrently with the /version fetch).
  • reachableFilterFn now reads reachable directly instead of the softwareVersion proxy.

Part of #319. The Version-column display of prerelease builds is fixed separately, pending upstream FilecoinFoundationWeb/filecoin-foundation#2336.

Test

  • GET https://pdp.660688.xyz:8443/pdp/ping200, access-control-allow-origin: *.
  • biome check + tsc clean on changed files.

@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

@beck-8 is attempting to deploy a commit to the FilOz Team on Vercel.

A member of the Team first needs to authorize it.

@FilOzzy FilOzzy added this to FOC Jun 5, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Jun 5, 2026
@beck-8 beck-8 force-pushed the feat/pdp-ping-reachability branch from e6d566c to f7008db Compare June 5, 2026 13:54
beck-8 added 2 commits June 5, 2026 21:56
…ion string

Reachability was proxied by whether a provider's /version response parsed
into a known format (softwareVersion set). That conflates "has a parseable
version" with "is reachable": prerelease builds whose version string doesn't
match the expected pattern were treated as unreachable and hidden by the
default reachable=true filter.

Add a dedicated /pdp/ping probe (2xx => reachable; endpoint serves CORS *,
so it is browser-safe) and a `reachable` field on ServiceProvider. The
reachable filter now reads this field directly instead of inferring it from
the version string. Version fetch and ping run concurrently per provider.
The reachable filter was keyed to the `softwareVersion` column id while its
filterFn read `row.original.reachable`. It worked, but was misleading: the
column-filter state reported `softwareVersion` as filtered, and the Version
column could not host a real version filter.

Move the filter onto a dedicated, hidden `reachable` column (kept out of the
table via columnVisibility) so the filter's column id matches what it
filters. The Version column no longer carries a filterFn.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Service Providers table reachability by replacing the prior “parseable /version string” proxy with an explicit /pdp/ping probe, ensuring prerelease Curio nodes (e.g. -rc1) aren’t incorrectly treated as unreachable and hidden by the default “reachable=true” filter.

Changes:

  • Adds a browser-safe fetchReachable() implementation that probes GET /pdp/ping and treats any 2xx as reachable.
  • Extends provider enrichment to populate a new reachable boolean alongside softwareVersion.
  • Updates table filtering to use a dedicated hidden reachable column instead of piggybacking on the Version column.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/services/providers/types.ts Updates base provider type to exclude the new reachable field prior to enrichment.
src/services/providers/ping.ts Introduces /pdp/ping probe logic with timeout + abort handling.
src/services/providers/index.ts Enriches each provider with reachable (via ping) in parallel with /version.
src/services/providers/constants.ts Adds ping timeout and renames concurrency constant to reflect enrichment batching.
src/schemas/provider-schema.ts Adds required reachable: boolean to the provider schema/type.
src/app/service-providers/utils/service-provider-filters.ts Reworks reachability filter to read row.original.reachable directly.
src/app/service-providers/utils/map-filter-state-to-column-filters.ts Maps the reachable filter state to the new reachable column id.
src/app/service-providers/data/column-definition.tsx Adds a hidden data-only reachable column to back filtering (decoupled from Version).
src/app/service-providers/components/ServiceProvidersTable.tsx Hides the filter-only reachable column via columnVisibility.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BigLep BigLep moved this from 📌 Triage to 🔎 Awaiting review in FOC Jun 5, 2026

@silent-cipher silent-cipher left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Comment thread src/services/providers/index.ts Outdated
@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC Jun 8, 2026
@rjan90 rjan90 merged commit 9de494b into FilOzone:main Jun 8, 2026
4 of 5 checks passed
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

6 participants