Proposal to change backwards compatibility constraints on D-Bus interface revisions #388
Replies: 5 comments 3 replies
-
I'm not sure that will happen in practice. People tend to add API usage ad-hoc based on what they see, so you'll wind up seeing mixtures in practice. |
Beta Was this translation helpful? Give feedback.
-
Example: Interface |
Beta Was this translation helpful? Give feedback.
-
Personally, I am a big fan of backwards compatibility in APIs and this proposal actually keeps it. Compatibility would only be lost when old revisions of interfaces are removed completely, but you are not proposing this. Nobody will be broken just because stratisd is updated to a new minor version. Updating a client to use a newer minor version of the interfaces might be more work with this proposal than before, but as long as it is possible without changes to the actual functionality, there should be not too many complaints. Good documentation always helps, of course. What you propose in your example is okay, but removing org.storage.stratis3.blockdev.r0 or removing any means to manage the user info with org.storage.stratis3.blockdev.r1 would not be okay. |
Beta Was this translation helpful? Give feedback.
-
Example: Removing useless argument in |
Beta Was this translation helpful? Give feedback.
-
We went ahead with this with what we believe will be a satisfactory solution. Discussions don't close, and this one doesn't turn well into an issue, so I'm just locking it. |
Beta Was this translation helpful? Give feedback.
-
Background: Currently we release new revisions of the D-Bus interfaces that stratisd supports with every stratisd minor release. The constraint that we previously imposed, in the 2.0 releases, on successive revisions is that each revision supports all the D-Bus methods and properties that the previous revision supported. We have always allowed D-Bus methods to extend their argument list with each new revision.
Proposal: In a new D-Bus interface revision for the 3.0 release, allow dropping properties and methods of the previous revision. Also allow dropping arguments from the argument list for existing D-Bus methods.
Motivation: Our code will be simpler and the simplicity will prevent some bugs that otherwise would occur.
Justification: In semantic versioning, the act of increasing the minor version is used to indicate that the associated release contains an enhancement. For stratisd, we consider the new revisions of each stratisd interface to constitute an optional enhancement that a client may choose to take advantage of, but is not obliged to. The client may continue to use the revisions of the Stratis D-Bus interfaces associated with the previous minor version, and in that case, it may expect that stratisd will continue to work as before. Thus, backwards compatibility in stratisd across minor releases is correctly preserved.
Remarks: stratisd has never been tested with and does not support a mixture of revision numbers for different Stratis D-Bus interfaces. A client must select just one revision number for all Stratis D-Bus interfaces.
Beta Was this translation helpful? Give feedback.
All reactions