Skip to content

chore(deps): upgrade @parity product-sdk stack to latest + migrate to Result API#470

Open
ReinhardHatko wants to merge 3 commits into
mainfrom
rh/upgrade-product-sdk
Open

chore(deps): upgrade @parity product-sdk stack to latest + migrate to Result API#470
ReinhardHatko wants to merge 3 commits into
mainfrom
rh/upgrade-product-sdk

Conversation

@ReinhardHatko

@ReinhardHatko ReinhardHatko commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Completes #465 — upgrades the full @parity dependency stack to latest published and migrates the CLI to the product-sdk Result-based error API.

Commits

  1. chore(deps): upgrade @parity product-sdk stack to latest and migrate to Result API
  2. refactor: reuse the unwrapResult helper for the fromLiveClient result unwrap

Dependency bumps

  • product-sdk: host 0.14.1 (now built on @parity/truapi, replacing the former @novasamatech in-container host-api), cloud-storage 0.8.1, contracts 0.9.2, descriptors 0.8.0, keys 0.3.16, terminal 0.6.2, tx 0.3.2. Vendored headless-host prerelease dropped.
  • tooling: polkadot-app-deploy 0.13.1, dotns-cli 0.8.0, cdm-builder 3.2.0, cdm-codegen 0.6.23, cdm-env 2.1.0.
  • polkadot-api aligned to 2.2.1 (single runtime instance — cdm-builder 3.2.0 pulled a second 2.x copy alongside 2.1.6).

Notable changes

  • Result-API migration. submitAndWatch, contract .tx() / ContractManager.fromLiveClient, and cloud-storage checkAuthorization now return a Result instead of throwing. New src/utils/tx.ts::unwrapResult re-throws the err channel so existing throw-based control flow (deploy aborts, drip/fund error surfacing, the Invalid-Payment retry loop) is preserved unchanged. registry.publishDev folded into publish(…, is_dev_signer).
  • Summit / w3s retired — dropped upstream by polkadot-app-deploy 0.13.x and product-sdk-descriptors 0.8.0 (the "retire summit" half of Add support for the latest environments (add devnet, retire summit/w3s) #466; adding devnet is still open).
  • statement-store pnpm patch re-pinned to 0.8.11; CLAUDE.md dependency notes refreshed.

Verification

  • pnpm typecheck ✓ · pnpm test (995) ✓ · pnpm format:check ✓ · pnpm lint:license ✓ · pnpm build
  • xhigh code review run; the one confirmed regression (a transient checkAuthorization read failure being conflated with an unauthorized slot, aborting valid deploys) is fixed and regression-tested.

Not in this PR / follow-ups

Reviewer note: all local gates pass; the live/e2e verification (init + install + deploy against a live env) called out under "follow-ups" above is still pending.

…to Result API

Bump all @parity/product-sdk-* to latest published: host 0.14.1 (now built on @parity/truapi instead of the @novasamatech in-container host-api), cloud-storage 0.8.1, contracts 0.9.2, descriptors 0.8.0, keys 0.3.16, terminal 0.6.2, tx 0.3.2; drop the vendored headless-host prerelease. Bump polkadot-app-deploy 0.13.1, dotns-cli 0.8.0, cdm-builder 3.2.0, cdm-codegen 0.6.23, cdm-env 2.1.0; align polkadot-api to 2.2.1 as a single runtime instance.

Migrate command handlers to the product-sdk Result-based error API (submitAndWatch, contract .tx/fromLiveClient, cloud-storage checkAuthorization) while preserving user-facing error messages; add src/utils/tx.ts::unwrapTx. Retire the summit/w3s env (dropped upstream by polkadot-app-deploy 0.13.x and product-sdk-descriptors 0.8.0). Re-pin the statement-store pnpm patch to 0.8.11.

Refs #465.
… unwrap

Rename tx.ts's unwrapTx -> unwrapResult (it already handles any @parity/result Result, not just tx submits) and use it in registry.ts::liveManager instead of an inlined `if (!result.ok) throw result.error; return result.value`. Pure refactor: the helper body and every call site's semantics are unchanged. Follow-up to the #465 code review (reuse finding).
@github-actions

Copy link
Copy Markdown
Contributor

Dev build ready — try this branch:

curl -fsSL https://raw.githubusercontent.com/paritytech/playground-cli/main/install.sh | VERSION=dev/rh/upgrade-product-sdk bash

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

E2E Test Pass · ❌ FAIL

Tag: e2e-ci-pr · Branch: rh/upgrade-product-sdk · Commit: 2310e3e · Run logs

Cell Result Time
pr-deploy-foundry ✅ PASS 2m13s
pr-mod ❌ FAIL 2m35s
pr-login-session ❌ FAIL 4m22s
pr-preflight ❌ FAIL 2m42s
pr-install ✅ PASS 0m50s
pr-deploy-frontend ❌ FAIL 3m11s
pr-deploy-cdm ✅ PASS 4m37s
${{ matrix.cell }} ⏭️ SKIP 0m00s
${{ matrix.cell }} ⏭️ SKIP 0m00s

Sentry traces: view spans for this run

The publish path threw a generic "Registry publish transaction reverted" and discarded the typed error, hiding the actual reason (e.g. NotRevealed, Unauthorized). A single classifyRevert() now decodes the reason from the contracts .tx() err value (ContractRevertedError.reason/.data, a dry-run/dispatch .dispatchError, or a TxError's .formatted) and decides whether the failure is a deterministic revert.

Deterministic reverts fail fast — the identical tx reverts the same way every retry, so surface it immediately instead of burning the 3-attempt / ~18s retry budget; transient failures (RPC drops, timeouts) carry no revert marker and still retry. Adds a regression test and refreshes the changeset bullet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant