Skip to content

Comprehensive migrations - #3268

Merged
texodus merged 1 commit into
masterfrom
perspective-migrate
Nov 4, 2026
Merged

texodus merged 1 commit into
masterfrom
perspective-migrate

Conversation

@texodus

@texodus texodus commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

This PR adds perspective-migrate, which upgrades persisted configs written by any release since 2.0.0 to the current schema. It covers engine ViewConfigs, ViewerConfigs (<perspective-viewer> save() tokens) and WorkspaceConfigs (saveWorkspace() tokens, including the old lumino <perspective-workspace> layouts).

  • Each object's own version field decides how it's upgraded. Without one, it falls back to an optional from_version, then to 2.0.0. Migrating the output again changes nothing.
  • Error validation lists what was dropped or approximated, and which schema changes were applied.
  • First-party plugin payloads are migrated. Third-party plugins can add their own steps through PluginMigration.
  • Written in rust so the same implementaiton is portable in all host languages:
    • Rust: the perspective-migrate crate.
    • @perspective-dev/client:
      • Browser: migrate(), after registering the wasm with init_server({wasm32, wasm64, migrate}). In JS it ships as a separate wasm; It's only downloaded on the first migrate() call, and the CDN bundles register it automatically.
      • Node.js: migrate(), with no registration needed.
    • Python:*perspective.migrate().

Breaking

  • restore(), addPanel() and restoreWorkspace() reject keys the config format doesn't define. When a rejected config is stamped by another release, the error names that release and points to migrate().
  • Removed legacy fallbacks:
    • array-form expressions;
    • the is None / is not None filter operators;
    • the sum not null and pct sum grand total aggregates;
    • fuzzy matching of plugin names;
  • view.get_config() now emits aggregate names that table.view() accepts, e.g. last instead of last value.

@texodus texodus added enhancement Feature requests or improvements breaking labels Oct 25, 2026
@texodus
texodus force-pushed the perspective-migrate branch 2 times, most recently from 8434275 to 03c697c Compare November 3, 2026 18:51
Signed-off-by: Andrew Stein <steinlink@gmail.com>
@texodus
texodus force-pushed the perspective-migrate branch from 03c697c to 00502aa Compare November 3, 2026 22:43
@texodus
texodus marked this pull request as ready for review November 3, 2026 23:39
@texodus
texodus merged commit cca3ba7 into master Nov 4, 2026
19 checks passed
@texodus
texodus deleted the perspective-migrate branch November 4, 2026 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking enhancement Feature requests or improvements

Development

Successfully merging this pull request may close these issues.

1 participant