aid needed actions on schema update #214

Open
opened 2025-02-28 10:51:30 +01:00 by kiara · 0 comments
Owner

As an operator,
Given one of my applications has updated to a version introducing breaking changes to configuration options (#159),
I want for Fediversity to aid me in taking the required actions,
so that I may resolve these issues and make use of my updated applications.

implementation notes

  • API (#368): send a diff (missing rename?).
  • front-end:
    • form mode: present the operator with side-by-side forms for both the old schema (potentially read-only form) and the new schema (to be completed by the user)
    • power mode:
      • show a diff of the JSON-Schema (see #213)
      • in the form(s?) maybe additionally display the fields' keys as used on the JSON level
      • present the JSON value of the incumbent old deployment configuration (read-only) based on the old schema, then another (for the user to correct and submit) for the new schema. (avoid yaml over spacing, toml over key repetition in sub-headers.)
  • aside from notifying the user of changes (#213), we should handle forward operations (see #629) for JSON schema (strict) according to their type, if default values have not been supplied. in practice, this comes down to notifying the user action is needed (or possible).

no action needed:

  • rename
  • Remove optional field
  • Remove required field

action optional:

  • Add optional field
  • Add union/oneof variant
  • Widen a scalar type

action conditionally required:

  • Remove union/oneof variant
  • Narrow a scalar type

action required:

  • Add required field

other:

  • type change: maybe cast, otherwise regard as (new) field for which we may show old value for reference
**As** an operator, **Given** one of my applications has updated to a version introducing breaking changes to configuration options (#159), **I want** for Fediversity to aid me in taking the required actions, **so that** I may resolve these issues and make use of my updated applications. ### implementation notes - API (#368): send a [diff](https://github.com/getsentry/json-schema-diff) (missing rename?). - front-end: - form mode: present the operator with side-by-side forms for both the old schema (potentially read-only form) and the new schema (to be completed by the user) - power mode: - show a diff of the JSON-Schema (see #213) - in the form(s?) maybe additionally display the fields' keys as used on the JSON level - present the JSON value of the incumbent old deployment configuration (read-only) based on the old schema, then another (for the user to correct and submit) for the new schema. (avoid yaml over spacing, toml over key repetition in sub-headers.) - aside from notifying the user of changes (#213), we should handle [forward operations](https://docs.confluent.io/platform/7.9/schema-registry/fundamentals/schema-evolution.html#summary) (see #629) for JSON schema (strict) according to their type, if default values have not been supplied. in practice, this comes down to notifying the user action is needed (or possible). no action needed: - rename - Remove optional field - Remove required field action optional: - Add optional field - Add union/oneof variant - Widen a scalar type action conditionally required: - Remove union/oneof variant - Narrow a scalar type action required: - Add required field other: - type change: maybe cast, otherwise regard as (new) field for which we may show old value for reference
kiara changed title from visually aid needed actions on schema update to aid needed actions on schema update 2025-04-30 08:43:10 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: fediversity/fediversity#214
No description provided.