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

Figure out whether changing the imports constitute a BC or NBC change #4

Closed
rgwilton opened this issue Feb 27, 2019 · 7 comments
Closed
Assignees
Labels
updated-mod-rev-handling Issues related to yang-module-versioning (updated module revision handling draft)

Comments

@rgwilton
Copy link
Collaborator

What happens if an import becomes more/less restrictive.

Previously proposed text by Balazs:

     Removing the import-versions statements as long as at least one of the 
     original statements remain, is backwards compatible.
     Changing the version-clause to prohibit some previously allowed 
     versions and NOT to allow any new import-candidates is BC.
     Adding import-versions statements or changing the version-clause to 
     allow new import-candidates is risky. It may or may not be compatible 
     depending on the compatibility of the imported module, on how the 
     import is used etc. It gets to complicated, so lets call it NBC. 
@rgwilton rgwilton added the yang-semver-soln Issues that apply to yang-semver (yang semver solution draft) label Feb 27, 2019
@jsterne
Copy link
Collaborator

jsterne commented Feb 27, 2019 via email

@Reshad-Rahman
Copy link
Collaborator

Even increasing the set of versions can be safe if it's adding BC versions, e.g. going from 1.1.0 to 1.1.0-1.2.0 is BC?

As others have mentioned, when we're adding NBC versions to the set, we don't know the impact on the importing module. Systematically making that NBC is the simple solution but can be incorrect. Imagine a type in ietf-xxx-types.yang being changed in a backwards incompatible way and lots of modules having to go NBC version change even if the type which got changed in NBC way isn't used by the importing modules.

@rgwilton rgwilton added updated-mod-rev-handling Issues related to yang-module-versioning (updated module revision handling draft) and removed yang-semver-soln Issues that apply to yang-semver (yang semver solution draft) labels Jun 4, 2019
@rgwilton
Copy link
Collaborator Author

rgwilton commented Jul 1, 2020

I think that versioning should be considered at two levels: (i) on an individual module file basis (ii) at the schema/package level.

At the individual module file level; adding, changing, or removing a module is a backwards-compatible-change, since the change in itself doesn't change the module schema.

Of course, the imported module might have changed in a NBC way between revisions, but this must be detected as the package level.

Say an imported module exists in versions 1.0.0 and 2.0.0 with NBC changes in a used grouping. If an importing module specified "1.0.0 or derived" then it could end up with "1.0.0 or 2.0.0". Updating it to "2.0.0 or derived" doesn't necessarily change the schema because 2.0.0. might have been previously used. Therefore the version of a module shouldn't be affected by the version of its imports - we should leave that problem to be solved at a higher layer, i.e. the packages draft, which I believe already solves this problem.

Hence, to close this issue I propose that we add a sentence to section 3.1.1 stating that add, removing, or changing an import statement (including add,changing, or removing a restriction on which specific revisions may be imported) is a backwards compatible change.

@Reshad-Rahman
Copy link
Collaborator

Notes from virtual interim on Dec 14th 2020:

For #4, a change to the import statement is considered as backwards-compatible. There were some discussions as to whether there should be exceptions, but the semver draft already allows the major version to be bumped when all changed made are BC.

Under some circumstances (e.g., to avoid adding a "compatible"
modifier) an artifact author MAY also update the MAJOR version
when the only changes are backwards-compatible.

@jsterne
Copy link
Collaborator

jsterne commented May 26, 2022

We need to add text to section 3.1.1 to indicate import changes are BC

@jsterne jsterne reopened this May 26, 2022
@jsterne jsterne self-assigned this May 26, 2022
@jsterne
Copy link
Collaborator

jsterne commented Sep 13, 2022

If we move to import by revision-or-derived to being less strict, then that also lends weight to this simply being BC.

@jsterne
Copy link
Collaborator

jsterne commented Oct 10, 2022

Updated text added to section 3.1.1 of PR#157

@jsterne jsterne closed this as completed Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
updated-mod-rev-handling Issues related to yang-module-versioning (updated module revision handling draft)
Projects
None yet
Development

No branches or pull requests

3 participants