Skip to content

fix(providers): parse prerelease Curio versions (e.g. 1.28.2-rc1)#321

Draft
beck-8 wants to merge 1 commit into
FilOzone:mainfrom
beck-8:fix/prerelease-version-parsing
Draft

fix(providers): parse prerelease Curio versions (e.g. 1.28.2-rc1)#321
beck-8 wants to merge 1 commit into
FilOzone:mainfrom
beck-8:fix/prerelease-version-parsing

Conversation

@beck-8

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

Copy link
Copy Markdown
Contributor

Draft — gated on the upstream parser fix. The code change here is complete; the only remaining step is bumping @filecoin-foundation/ui-filecoin to the release that ships the prerelease-aware parser (FilecoinFoundationWeb/filecoin-foundation#2337) and updating the lockfile. Do not merge before that bump — until then the package still rejects -rc1.

What

Validate software versions with @filecoin-foundation/ui-filecoin's parseVersionString instead of a duplicate local regex, so prerelease Curio builds (e.g. 1.28.2-rc1) are handled consistently everywhere.

Why

isValidVersion used a local VERSION_PATTERN that, like the package's parseVersionString, rejected the -rc1 prerelease suffix. RC builds failed validation, so softwareVersion was left unset and the Version column showed -. The display component and CSV export already use the package parser, so the local regex was a second, divergent copy of the same logic.

How

  • isValidVersion now returns parseVersionString(version) !== undefined — a single source of truth shared with display and CSV.
  • Remove the duplicate VERSION_PATTERN.

No local parser and no custom render: prerelease support arrives entirely through the dependency once #2337 is released.

Remaining step (on upstream release)

  • Bump @filecoin-foundation/ui-filecoin to the fixed release + commit the lockfile, then mark ready.

Part of #319. Upstream fix: FilecoinFoundationWeb/filecoin-foundation#2336 / #2337.

@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 fix/prerelease-version-parsing branch from 567927b to f268741 Compare June 5, 2026 14:06
Validation duplicated the package's version parsing as a local VERSION_PATTERN
regex; both rejected semver prerelease suffixes (e.g. `1.28.2-rc1`), so RC
builds failed validation and showed no version.

Validate with the package's parseVersionString — the same parser used for the
table display and CSV — and drop the duplicate VERSION_PATTERN. Prerelease
handling then takes effect once @filecoin-foundation/ui-filecoin ships the
prerelease-aware parser; the only remaining change is bumping that dependency.
@beck-8 beck-8 force-pushed the fix/prerelease-version-parsing branch from f268741 to a371bb7 Compare June 5, 2026 14:06
@BigLep BigLep requested review from Copilot and silent-cipher and removed request for silent-cipher June 5, 2026 16:49

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

Updates provider software-version validation to rely on the shared @filecoin-foundation/ui-filecoin version parser, eliminating a locally duplicated regex so prerelease handling can become consistent once the upstream parser release is bumped in this repo.

Changes:

  • Switch isValidVersion to validate via parseVersionString(version) !== undefined.
  • Remove the now-unused VERSION_PATTERN constant from provider constants.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/services/providers/version.ts Uses parseVersionString for version validation instead of a local regex.
src/services/providers/constants.ts Removes the duplicated VERSION_PATTERN constant.

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

Comment on lines +24 to 28
* Validate a version string using the same parser as the table display and CSV.
*/
function isValidVersion(version: string): boolean {
return VERSION_PATTERN.test(version)
return parseVersionString(version) !== undefined
}
@BigLep BigLep moved this from 📌 Triage to ⌨️ In Progress in FOC Jun 5, 2026
@BigLep BigLep requested a review from nijoe1 June 9, 2026 16:15
@BigLep

BigLep commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@beck-8 : upstream fix has been merged and release should be going out. I assume you're unblocked now.

@beck-8

beck-8 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

@BigLep Upstream still needs to release a version

@BigLep

BigLep commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@BigLep Upstream still needs to release a version

Oof, this is turning into a chore. We're having slack conversations about what to do here (e.g., get https://github.com/FilecoinFoundationWeb/filecoin-foundation maintainers engaged, remove our dependency on the repo)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ⌨️ In Progress

Development

Successfully merging this pull request may close these issues.

ui-filecoin: parseVersionString rejects semver prerelease versions (-rc1 / -beta)

4 participants