[YANGTOOLS-1393] InferenceException thrown when uses/augment is conditional on unsupported feature Created: 01/Feb/22 Updated: 03/Jun/23 Resolved: 08/Feb/22 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | parser |
| Affects Version/s: | 6.0.6, 6.0.10 |
| Fix Version/s: | 8.0.0, 7.0.14 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Lovaraju Kajulooti | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Priority: | High | ||||||||
| Description |
|
While parsing the attached yang files, I see the below exception Caused by: org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException: Augment target 'Descendant {qnames=[(urn:ietf:params:xml:ns*:ietf-netconf-server*?revision=2018-10-22)client-auth]}' not found [at ietf-netconf-server.yang:86:16]
Problem: we have a "augment" statement under "uses", which is failed to validate in 6.0.6 (it was working in 3.0.16). uses ts:tls-server-grouping { refine "client-auth" { ... augment "client-auth" { ... Here the issue occurs at augment, saying that client-auth is not found in ietf-netconf-server. But, The client-auth container is defined under the grouping in ietf-tls-server.
Note: I have tried adding prefix to client-auth, that is augment "ts:client-auth" {
It is still failing but with different exception - Augment target 'Descendant {qnames=[(urn:ietf:params:xml:ns:yang:*ietf-tls-server*?revision=2018-10-22)client-auth]}' not found [at ietf-netconf-server.yang:86:16] |
| Comments |
| Comment by Robert Varga [ 01/Feb/22 ] |
|
I cannot reproduce the issue with the provided models. |
| Comment by Lovaraju Kajulooti [ 02/Feb/22 ] |
|
rovarga on which version you tried?
Here is the stack trace:
Caused by: org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException: Augment target 'Descendant {qnames=[(urn:ietf:params:xml:ns:yang:ietf-tls-server?revision=2018-10-22)client-auth]}' not found [at ietf-netconf-server.yang:86:16]Caused by: org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException: Augment target 'Descendant {qnames=[(urn:ietf:params:xml:ns:yang:ietf-tls-server?revision=2018-10-22)client-auth]}' not found [at ietf-netconf-server.yang:86:16] at org.opendaylight.yangtools.yang.parser.rfc7950.stmt.augment.AbstractAugmentStatementSupport$1.prerequisiteFailed(AbstractAugmentStatementSupport.java:150) at org.opendaylight.yangtools.yang.parser.stmt.reactor.ModifierImpl.failModifier(ModifierImpl.java:87) at org.opendaylight.yangtools.yang.parser.stmt.reactor.SourceSpecificContext.failModifiers(SourceSpecificContext.java:325) at org.opendaylight.yangtools.yang.parser.stmt.reactor.BuildGlobalContext.addSourceExceptions(BuildGlobalContext.java:334) at org.opendaylight.yangtools.yang.parser.stmt.reactor.BuildGlobalContext.completePhaseActions(BuildGlobalContext.java:424) at org.opendaylight.yangtools.yang.parser.stmt.reactor.BuildGlobalContext.executePhases(BuildGlobalContext.java:222) at org.opendaylight.yangtools.yang.parser.stmt.reactor.BuildGlobalContext.buildEffective(BuildGlobalContext.java:233) at org.opendaylight.yangtools.yang.parser.stmt.reactor.CrossSourceStatementReactor$BuildAction.buildEffective(CrossSourceStatementReactor.java:232) at org.opendaylight.yangtools.yang.parser.impl.YangParserImpl.buildEffectiveModel(YangParserImpl.java:102) at org.opendaylight.yangtools.yang.parser.repo.SharedSchemaContextFactory$AssembleSources.apply(SharedSchemaContextFactory.java:241) at org.opendaylight.yangtools.yang.parser.repo.SharedSchemaContextFactory$AssembleSources.apply(SharedSchemaContextFactory.java:190) at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:213) at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:202) at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:118) at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30) at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1174) at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:719) at com.google.common.util.concurrent.FluentFuture$TrustedFuture.addListener(FluentFuture.java:110) at com.google.common.util.concurrent.AbstractTransformFuture.create(AbstractTransformFuture.java:39) at com.google.common.util.concurrent.Futures.transformAsync(Futures.java:456) at org.opendaylight.yangtools.yang.parser.repo.SharedSchemaContextFactory.createSchemaContext(SharedSchemaContextFactory.java:104) at org.opendaylight.yangtools.yang.parser.repo.SharedSchemaContextFactory.createEffectiveModelContext(SharedSchemaContextFactory.java:75) at |
| Comment by Robert Varga [ 04/Feb/22 ] |
|
I have tested against both current master and current 6.0.x (which has no functional changes compared to 6.0.10). |
| Comment by Robert Varga [ 08/Feb/22 ] |
|
So the critical piece of information missing in this bug report is that the if-feature conditional is false. |