Skip to content

Enfyra Server v2.1.4

Choose a tag to compare

@dothinh115 dothinh115 released this 29 Apr 04:53

Enfyra Server v2.1.4

Breaking Changes

REDIS_RUNTIME_CACHE can move runtime cache snapshots from per-instance memory into Redis. When enabled, all server instances with the same NODE_NAME share runtime cache state through Redis, so deployments must use a stable NODE_NAME and a reachable REDIS_URI; leave REDIS_RUNTIME_CACHE=false to keep local in-process cache behavior.

REDIS_USER_CACHE_LIMIT_MB now applies a soft Redis memory quota to user-created $cache data only. Runtime cache, BullMQ, runtime monitor, and other system Redis keys are excluded from this quota; configure the limit with REDIS_USER_CACHE_LIMIT_MB and use REDIS_USER_CACHE_MAX_VALUE_BYTES to cap individual $cache values.

Features

  • Added RedisRuntimeCacheStore and REDIS_RUNTIME_CACHE so metadata, routes, guards, fields, packages, folders, flows, websocket, OAuth, settings, and GraphQL runtime caches can be shared through Redis across same-NODE_NAME instances.
  • Added UserCacheService as the $cache Redis backend with LRU tracking, quota metadata, value-size validation, and REDIS_USER_CACHE_LIMIT_MB / REDIS_USER_CACHE_MAX_VALUE_BYTES env configuration.
  • Added /admin/redis/* routes and RedisAdminService for root-admin Redis overview, key browsing, key detail reads, key writes, deletes, TTL updates, key classification, current-namespace scoping, and Redis server hardware reporting.
  • Added Redis admin websocket read handlers on /enfyra-admin so the app can receive live Redis overview, key list, and key detail data while keeping write operations on REST APIs.
  • Added Redis key classification for runtime cache, $cache, BullMQ, Socket.IO, runtime monitor, SQL pool coordination, system locks, and current namespace keys.
  • Added aggregate query support for REST, GraphQL, and dynamic repository reads through aggregate field and relation count configs, with results returned under meta.aggregate.
  • Added package runtime bridge, codec, and child-process fallback so Node-runtime package calls can run outside the isolate while preserving awaitable package handles, callbacks, dates, typed arrays, and ArrayBuffers.
  • Added POST /admin/test/run support for saved route scripts, flow steps, websocket handlers, captured logs, and captured socket emits.
  • Added Redis-backed runtime metrics storage with TTLs for request, cache, query, flow, and process telemetry.
  • Added SQL pool coordination telemetry and Redis admin classification for SQL pool cluster keys.

Bug Fixes

  • Fixed Redis admin key mutation for display keys such as user:<id> by resolving existing NODE_NAME:<key> entries before falling back to $cache storage.
  • Fixed Redis admin writes for editable non-$cache keys by supporting raw Redis string, hash, list, set, and zset values instead of forcing every editable key through $cache.
  • Fixed Redis admin delete reporting so no-op deletes return the real Redis deletion count.
  • Fixed runtime cache snapshot keys to use snake_case names and remain scoped to NODE_NAME.
  • Fixed BullMQ key formatting so queue prefixes use NODE_NAME:sys_queue:* without duplicate separators.
  • Fixed body validation so non-null generated columns can be omitted from client create/update bodies when the server is expected to populate them.
  • Fixed admin test-run requests so global dynamic interceptors do not mutate test-run payloads or response envelopes.
  • Fixed field permission bootstrap/provision cleanup and published-method cleanup behavior.
  • Improved cache reload orchestration, partial reload handling, Redis pub/sub notification behavior, and cache reload tests.
  • Improved metadata cache loading and SQL/Mongo query builder coverage for aggregate, deep, relation, and filter behavior.
  • Improved request-scope disposal so successful responses, thrown errors, and closed connections all dispose request scopes.
  • Improved binary Redis string reads by summarizing non-text values instead of dumping raw binary into admin details.