Skip to content

Updated README.md for versioning definitions #11

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

Merged
1 commit merged into from
Feb 3, 2017
Merged
Show file tree
Hide file tree
Changes from all 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
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ existing fields should be set, unless not setting a field carries a specific mea
comment.


Compatibility
--------------
Defintion: FAITHFULLY "All recorded data is correctly interpreted by the interface"

Forward compatibility:
Definition: "An older verison of code can be used to read new files"
Data recorded with a higher minor or patch version of a major version can be read with code using the same major version but lower minor and patch version.
Newly added fields are ignored. All patch versions of the same major and minor version is FAITHFULLY forward compatible.

Backward compatibility:
Definition: "A newer version of code can be used to read old files"
All files which have been recorded in the past with a specicific major version are FAITHFULLY valid with all combinations of
higher minor and patch versions of the same major version.


Fault injection: how-to
------------------------
Injection of pre-defined sensor errors should be handled by a specialized "fault injector" component that acts like a
Expand All @@ -30,4 +45,25 @@ Specific errors should be handled as follows:

Versioning
----------
The version number is defined in InterfaceVersion::version_number in osi_common.proto as the field's default value.
The version number is defined in InterfaceVersion::version_number in osi_common.proto as the field's default value.

Major:
A change of the major version results in an incompatibility of code and recorded proto messages.
- An existing field with a number changes its meaning
optional double field = 1; -> repeated double field = 1;
Changing the definition of units of a field
- Deleting a field and reusing the field number
- Changing the technology
ProtoBuffer -> FlatBuffer

Minor:
A change of the minor version indicates remaining compatibility to previously recorded files. The code on the other hand needs fixing.
- Renaming of a field without changing the field number
- Changing the names of messages
- Adding a new field in a message without changing the numbering of other fields

Patch:
The compatibility of both recorded files and code remains.
- File or folder structure which does not affect including the code in other projects
- Changing or adding comments
- Clarification of text passages explaining the message content
4 changes: 3 additions & 1 deletion osi_common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ message InterfaceVersion
{
// The field containing the version number. Should be left on default, not to be modified by sender.
// Increments will happen as part of changes to the whole interface.
optional uint32 version_number = 1 [default = 17];
optional uint32 major = 1 [default = 2];
optional uint32 minor = 2 [default = 0];
optional uint32 patch = 3 [default = 0];
}

/**
Expand Down