Issue #6770 has been updated by Daniel Pittman.
We will be making versioning mandatory, as part of unification of the interface
access paths.
The mechanism will be:
Puppet::Interface::Catalog::V1
We also supply the helper:
Puppet::Interface::Catalog::Latest
This allows someone to explicitly get the latest version of an interface, but
only explicitly. Then when we change it, and their code breaks, they get to
keep both pieces, and we explain why they should have been explicit about the
version they were using.
Rule for these: if you make a bug fix – move closer to the documented, or
intended, semantics – you might bump the version number, but you will just
return the newer version as compatible. If you deliberately break
compatibility then you bump the version number, and probably write a shim.
----------------------------------------
Feature #6770: Interfaces don't support versioning
https://projects.puppetlabs.com/issues/6770
Author: Paul Berry
Status: Accepted
Priority: Normal
Assignee:
Category: interfaces
Target version: 2.6.x
Affected Puppet version:
Keywords:
Branch:
In order to provide for better backward compatibility if a specific interface
changes in the future, we should have a versioning scheme for interfaces.
For example, the writer of an interface action should be able to specify which
version of that action they are writing, e.g.:
Puppet::Interface::Foo.action :bar, :version => '1.3.5' do |args|
...
end
And, when calling an interface, the caller should be able to specify which
version of the action they are trying to invoke:
Puppet::Interface::Foo.bar('x', 'y', :version => '2.4')
* If the requested version cannot be found, it's a fatal error.
* If a different version exists, that should be noted in the error message.
* We should use semantic versioning (as per semver.org) as the default approach
for specifying the versions of interface actions. This would also allow us to
permit version patterns for the callers (e.g. "give me anything in the 2.x
series")
* Invoking an action without a version (including from the command line) always
implicitly invokes the most recent version installed.
If we don't address versioning concerns from the outset, they will be difficult
to address in the future, because users of the interface API will already exist
in the field that do not specify their versions, and it will be difficult to be
backward-compatible in any meaningful way.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.