Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deprecation policy #1895

Merged
merged 3 commits into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ Welcome to the Synapse documentation!
synapse/apidocs
synapse/httpapi

synapse/autodocs/datamodel_types
synapse/autodocs/datamodel_forms

synapse/datamodel
synapse/stormtypes

synapse/200_changes
Expand Down
16 changes: 16 additions & 0 deletions docs/synapse/datamodel.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.. _dm-index:

Synapse Data Model
##################

This contains documentation for Synapse Data Model, including the data model deprecation policy.

The current sections are:

.. toctree::
:titlesonly:

autodocs/datamodel_types
autodocs/datamodel_forms

datamodel_deprecation
60 changes: 60 additions & 0 deletions docs/synapse/datamodel_deprecation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

.. _dm-deprecation-policy:

============================
Datamodel Deprecation Policy
============================

As the Synapse Data Model has grown and evolved over time, Vertex has found the need
to deprecate model elements which are no longer useful. These elements may represent
relationships which are better captured with newer elements; concepts which are better
represented by convention; or other issues. As such, model elements (types, forms,
and properties) which are deprecated should no longer be used for new data modeling.
Deprecated model elements will be removed in a future Synapse release, no earlier than
``v3.0.0``.

For deprecated model elements, suggested alternatives will be provided and example Storm
queries which can be used to migrate data in such a fashion.

Using Deprecated Model Elements
-------------------------------

When Deprecated model elements are used in a Cortex, the following log events will be made:

- One startup, if a extended property definition uses a deprecated type to define it,
a warning message will be logged.
- If a extended property is added which uses a deprecated type to define it, a warning
message will be logged.
- Any Types or Forms, from a datamodel loaded by a custom CoreModule, which use a
deprecated model component will cause a warning message to be logged. This includes
any Array or Comp type model elements which utilize a deprecated Type.
- If a property or tag property is set on a node which is deprecated or using a
deprecated type, that will cause a warning message to be logged and a ``warn``
message to be sent over the Storm runtime. This only occurs once per given runtime.
- If a node is made using deprecated form or using a deprecated type, that will cause
a warning message to be logged and a ``warn`` message to be sent over the Storm
runtime. This only occurs once per given runtime.

Deleting nodes which use deprecated model elements does not trigger warnings, since that
would normally be done after an associated data migration and would be excessive in
the event of a large migration.

Deprecated Model Elements
-------------------------

The following elements are deprecated.

Types
+++++

There are currently no deprecated types.

Forms
+++++

There are currently no deprecated forms.

Properties
++++++++++

There are currently no deprecated properties.