[JSONRPC-40] Don't consider revision for equivalence when resolving module dependencies Created: 28/Feb/20 Updated: 08/Jul/20 Resolved: 06/Jun/20 |
|
| Status: | Verified |
| Project: | jsonrpc |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | Richard Kosegi | Assignee: | Richard Kosegi |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
When mounting peer, user is supposed to provide list of modules supported by given mount point. There is mechanism in place that allow to recursively resolve module dependencies using governance service. Problem can occur if user provide module (that is without revision) and same module is resolved as a part of dependency tree. Result is that 2 different entries are created in schema context (with same YANG source) and error is thrown:
Caused by: org.opendaylight.yangtools.yang.parser.spi.source.SourceException: Module namespace collision: http://openconfig.net/yang/types/yang. At [ByteSource.wrap(6D6F64756C65206F70656E636F6...)]:1:0 [at [ByteSource.wrap(6D6F64756C65206F70656E636F6...)]:1:0]
at org.opendaylight.yangtools.yang.parser.rfc7950.stmt.module.AbstractModuleStatementSupport.onLinkageDeclared(AbstractModuleStatementSupport.java:104) ~[480:org.opendaylight.yangtools.yang-parser-rfc7950:3.0.4]
at org.opendaylight.yangtools.yang.parser.stmt.reactor.StatementDefinitionContext.onDeclarationFinished(StatementDefinitionContext.java:78) ~[479:org.opendaylight.yangtools.yang-parser-reactor:3.0.4]
at org.opendaylight.yangtools.yang.parser.stmt.reactor.StatementContextBase.endDeclared(StatementContextBase.java:595) ~[479:org.opendaylight.yangtools.yang-parser-reactor:3.0.4]
This can be easily eliminated by ignoring revision field of module when doing dependnecy resolution.
|