Changing the ontology safely
Compatible and breaking changes, impact preview, confirmation, direct-edit settings and proposals.
Other things rely on an object type, a link type or an interface: actions, computed properties on other types, interfaces and the types that implement them. Before a change goes live, the product tells you what it would affect and asks you to confirm anything that would break.
Compatible and breaking changes
Every change is classified. A compatible change needs nothing from you. A warning change goes live without confirmation, but may affect something the product cannot track. A breaking change can stop something that works today.
| Change | Result |
|---|---|
| Add a property, a link type or an object type | Compatible |
| Change a display name or a property label | Compatible |
Change a property's type (property_type_changed) | Breaking |
Remove a property (property_removed) | Breaking |
Remove the property used as the title (title_property_removed) | Breaking |
Point a property at another column (property_column_changed) | Breaking |
Change an object type's key columns (backing_key_changed) or its table (backing_relation_changed) | Breaking |
Rename the key of an object type (key_changed) | Breaking |
Stop actions editing a property (property_not_editable) | Breaking |
Change a formula, aggregate or distance (derived_expression_changed, derived_aggregate_changed, graph_distance_changed) | Breaking |
Change a link's endpoints, columns or cardinality (link_endpoint_changed, link_columns_changed, link_cardinality_changed) | Breaking |
Take an interface off a type, or change how it is matched (interface_removed, interface_mapping_changed) | Breaking |
Make an interface property required (required_property_added) | Breaking |
Delete a definition (definition_deleted) | Breaking |
| Turn off Searchable or Filterable on a property | Warning |
| Close an open enum, or remove a choice from a closed one | Warning |
Warnings exist because the product does not keep a full list of saved filters or stored values. These changes are never refused, but they can affect something it cannot see.
Preview the impact before you save
On the property page, the interface page and the other editors, a What changes card shows the effect of your unsaved edit. It lists:
- the changes, each marked Breaking or Warning, in plain words;
- What uses it: the object types, actions, link types and interfaces that would be affected, and which of their properties break;
- more things you can't see: how many affected definitions are hidden from you (see below);
- a line starting "Couldn't check", for things the preview could not look at.
The card also says how the change goes live in How it goes live: Publish now or Stage in proposal.
Nothing is saved by a preview. To preview from code, see Preview impact in the API reference.
When you can't publish directly
You can't publish a change directly when the workspace requires proposals, or when an interface would no longer fit a type that implements it.
If some actions could not be read, the card shows a "Couldn't check" note. That note is advice, not a block: you can still publish a compatible change. Deleting an object type or interface in this state is refused, because the check is needed to know what would break.
If the preview would be too large to compute, it fails rather than letting you publish without a check.
Publishing a breaking change directly
When you press Publish now and the change is breaking, a dialog asks you to confirm. Its title says how much would break, for example "Publish and break 3 things that use it?". It lists:
- What changes: each breaking class and warning;
- the affected definitions and which properties break;
- how many more affected definitions you can't see;
- a note that code pinned to an earlier version stops.
Choose Keep editing to go back, Stage in a proposal to put the change in a proposal instead, or Publish anyway to go live. A draft save or a first publication of a new definition needs no confirmation. If someone else saved a newer version first, you see "Someone saved this first" and can reload it without losing your edits.
Confirming accepts the breaking changes only. It does not get past a workspace that requires proposals, a type that no longer fits an interface, a version conflict or a deletion that is blocked. The accepted version is recorded in the definition's history.
To save and confirm breaking changes from code, see Save a definition in the API reference.
Requiring proposals
By default editors can publish a change right away. A workspace can turn that off so that every change to an object type, link type or interface goes through a proposal.
In the product, use the Direct edits switch on the Ontology page. On: editors publish right away. Off: every change goes through a proposal, and merging needs the workspace govern permission. Changing the switch needs the govern permission. When it is off, Publish now shows Off and the Proposal row shows Needed.
Proposals
A proposal is a named bundle of changes that goes live together, or not at all.
- Stage. On an editor, choose Stage in proposal. Join the open proposal or start A new proposal with a name. Nothing changes for anyone until the proposal is merged.
- Review. The proposal page shows the changes and their impact on actions, other types and consumers.
- Merge. Merging checks the combined result, then publishes every change in one step. If any part fails, nothing is published.
A merge is itself the approval of the combined impact, so it needs no separate breaking-change confirmation.
Interfaces and the types that implement them
An interface and the types that implement it often have to change together. While staging, the interface does not need to fit yet. You can stage:
- a new interface and the types that implement it, in either order;
- a type that drops or changes an interface, then the interface change;
- a changed interface and the types that must change to fit it.
Each preview lists every implementing type and why it does not fit yet. Fit is checked at merge. If any type still does not fit, the merge is refused and nothing is published. Fix the types in the proposal and merge again.
Two ordering rules apply. Delete an interface only after you have staged the change that takes it off the types that implement it. Removing a staged new interface from a proposal while a staged type still implements it leaves the proposal unmergeable until that type is changed.
Publishing an interface directly needs every published implementer to fit. A proposal is the safer way to change both together.
To work with proposals from code, see Proposals in the API reference.
When something you can't read would break
Some definitions may be hidden from you by access rules. The product never names them, shows their properties or their fit details. Instead it says "N more things you can't see", and the API returns the count in hidden_count.
If a change would break an interface or type you cannot read, the error says "this change breaks a definition you can't see". Ask someone who can read that definition to review the change before you publish it.
Naming an interface you cannot read, or one that does not exist, gets the same answer: "interface is unavailable".