Skip to content

Ridu v0.15.0

Choose a tag to compare

@github-actions github-actions released this 06 Oct 11:03

Ridu 0.15.0

Block-heavy schemas now cost what their block definitions cost, however many places a block can
appear. Published reads and draft writes are faster on PostgreSQL, MongoDB saves no longer queue
behind shared references, and has-many fields can be filtered on every store.

Changes

  • Each block definition is resolved, stored, typed, migrated, and bound once, however many
    containers place it. Schemas with up to 290,867 field placements start in about 0.2 s and idle at
    30–40 MiB. Inline blocks resolve to the same schema as registered blocks, and the former
    100,000-placement limit is gone.
  • Hooks, validators, field access rules, dynamic defaults, and visibility conditions inside blocks
    no longer add cost per placement. Writes with hundreds of hooked block instances no longer fail
    with embedded_limit.
  • Filters reach fields through nested arrays and blocks on every store. The admin list filter picks
    fields by group, array, block, and block definition, with search, instead of listing every
    nested path.
  • Has-many relationships, uploads, selects, polymorphic relationships, and text and number lists
    share one membership contract: in, not(in), and exists. The admin offers "is any of" and
    "is none of", and SQLite evaluates these filters in SQL.
  • The engine validates sort paths and access-rule predicates for every transport. A join default
    sort the engine cannot sort by fails during config resolution, and an invalid access-rule
    predicate fails closed with invalid_access_predicate.
  • PostgreSQL stores published content in typed live tables. Updates reuse the row the engine
    locked and pipeline their statements, cutting a draft update from 20 database round trips to 8.
  • Pass pagination: false (?pagination=false over REST, ListOptions.SkipTotal in Go) to skip a
    list's total count. hasNextPage stays exact.
  • Making a field required now audits stored values during migration and development sync. Missing
    values block the change with RIDU_REQUIRED_VALUES_MISSING, naming the field, locale, count, and
    example documents, instead of failing later reads.
  • On MongoDB, saves that reference the same document share a lock instead of conflicting. An edit
    of a heavily referenced document waits for saves already in progress in its process, and later
    saves wait behind it.
  • A hook that writes the document being saved no longer leaves the outer write with a stale row.
  • The performance guide publishes Ridu and Payload comparisons, including block-heavy schemas.

Breaking changes and upgrade

Update the Go module and all Ridu npm packages to 0.15.0 together, regenerate application contracts
and migration artifacts, and rebuild the admin and application binary.

  • PostgreSQL and SQLite now accept only migration planner 1.3.0; MongoDB accepts only planner
    5.0.0. PostgreSQL replaces ridu_published_documents with typed live tables, and MongoDB adds
    the z_ridu_reference_fences collection. Older database layouts and migration histories require
    recreation. Back up application data and uploads before recreating a database, and rehearse
    restoration with the new schema before cutover.
  • Migration artifacts gain a block field rename intent and ** required-value addresses for block
    definition fields. Artifacts written with the former block types shape no longer parse.
  • An inline block slug may have only one definition; two different definitions under one slug fail
    with block_definition_conflict. schema_graph_exceeded is removed.
  • equals, contains, like, and range filters on set-valued fields fail with 400; use in.
    Polymorphic candidates are { relationTo, id } (query.Reference in Go). JSON contains and
    like match stored strings only, on every store.
  • Fields inside localized groups are no longer sortable, and container sorts fail with 400 for
    every caller.
  • GraphQL where inputs nest block fields under their block slug, expose in, not_in, and
    exists for set-valued fields, and return nullable totalDocs and totalPages.
  • The TypeScript MembershipWhere<T> replaces PrimitiveListWhere and MultiSelectWhere.
  • Go API changes:
    • store.UpdateRequest.Current is required.
    • migration.DataTransaction.Update takes a migration.UpdateRequest.
    • store.Page.Total is a pointer, nil when no count ran.
    • ManifestForRequest is replaced by LocalizationForRequest.
    • operation.Context.FieldPath is replaced by Context.BoundField.
    • postgres.Store.Plan, ApplyPlan, and Statement, and mongodb.Store.SyncIndexes, are
      removed. Use development sync, migrations, or postgres.Store.VerifySchema.
  • Custom admin code reading field capabilities finds those for block rows without values under
    blockFields, keyed by block slug and definition-relative path.

Enabling versioning on an already populated unversioned resource remains unsupported. This is a
pre-1 release with breaking contracts; keep the coordinated packages aligned. Production still runs
as a Go binary with its static admin embedded, without a JavaScript server.