<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:10:02 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[MDSAL-531] Unable to resolve grouping</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-531</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;the following two modules:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;module a {
  yang-version 1.1;
  namespace &quot;a&quot;;
  prefix a;
  import b { prefix b;}

  grouping foo {
    container bar {
      leaf foo {
        type string;
      }
      uses software-operation-state;
    }

    grouping software-operation-state {
      leaf bar2 {
        type empty;
      }
      uses next-operation-group;
    }

    grouping next-operation-group {
      list next-operation {
         key order;
         config false;

         leaf order {
             description &quot;A logical sequence number of operations to be done.&quot;;
             type uint8;
         }
         leaf operation-type {
             description &quot;Type of software action launched on the device.&quot;;
             type string;
         }
         leaf software-name {
             description &quot;Name of the software on which the operation was performed. For download operations, the leaf only records the software name and not the complete URL.&quot;;
             type string;
         }
      } // list next-operation
    }
  }
  augment &quot;/b:fooo&quot; {
    uses a:foo;
  }
}

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;module b {
  yang-version 1.1;
  namespace &quot;b&quot;;
  prefix b;

  container fooo {
    leaf baar {
      type empty;
    }
  }
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;results in AbstractTypeGenerator.addImplementedInterfaceFromUses() failure:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;[ERROR] yang-to-sources: Unable to generate sources with org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl generator
java.lang.IllegalStateException: Grouping AbsoluteSchemaPath{path=[(a)foo, (a)next-operation-group]}is not resolved for SoftwareOperationState
    at org.opendaylight.mdsal.binding.generator.impl.AbstractTypeGenerator.addImplementedInterfaceFromUses (AbstractTypeGenerator.java:1887)
    at org.opendaylight.mdsal.binding.generator.impl.AbstractTypeGenerator.addDefaultInterfaceDefinition (AbstractTypeGenerator.java:1625)
    at org.opendaylight.mdsal.binding.generator.impl.AbstractTypeGenerator.addDefaultInterfaceDefinition (AbstractTypeGenerator.java:1593)
    at org.opendaylight.mdsal.binding.generator.impl.AbstractTypeGenerator.addDefaultInterfaceDefinition (AbstractTypeGenerator.java:1587)
    at org.opendaylight.mdsal.binding.generator.impl.AbstractTypeGenerator.groupingsToGenTypes (AbstractTypeGenerator.java:700)
    at org.opendaylight.mdsal.binding.generator.impl.AbstractTypeGenerator.addDefaultInterfaceDefinition (AbstractTypeGenerator.java:1624)
    at org.opendaylight.mdsal.binding.generator.impl.AbstractTypeGenerator.addDefaultInterfaceDefinition (AbstractTypeGenerator.java:1593)
    at org.opendaylight.mdsal.binding.generator.impl.AbstractTypeGenerator.processDataSchemaNode (AbstractTypeGenerator.java:281)
    at org.opendaylight.mdsal.binding.generator.impl.AbstractTypeGenerator.containerToGenType (AbstractTypeGenerator.java:299)
    at org.opendaylight.mdsal.binding.generator.impl.AbstractTypeGenerator.addSchemaNodeToBuilderAsMethod (AbstractTypeGenerator.java:1055)
    at org.opendaylight.mdsal.binding.generator.impl.AbstractTypeGenerator.resolveDataSchemaNodes (AbstractTypeGenerator.java:1004)
    at org.opendaylight.mdsal.binding.generator.impl.AbstractTypeGenerator.moduleToGenTypes (AbstractTypeGenerator.java:239)
    at org.opendaylight.mdsal.binding.generator.impl.AbstractTypeGenerator.&amp;lt;init&amp;gt; (AbstractTypeGenerator.java:200)
    at org.opendaylight.mdsal.binding.generator.impl.CodegenTypeGenerator.&amp;lt;init&amp;gt; (CodegenTypeGenerator.java:32)
    at org.opendaylight.mdsal.binding.generator.impl.BindingGeneratorImpl.generateTypes (BindingGeneratorImpl.java:64)
    at org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl.generateSources (CodeGeneratorImpl.java:70)
    at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesProcessor.generateSourcesWithOneGenerator (YangToSourcesProcessor.java:383)
    at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesProcessor.generateSources (YangToSourcesProcessor.java:332)
    at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesProcessor.conditionalExecute (YangToSourcesProcessor.java:159)
    at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesMojo.execute (YangToSourcesMojo.java:127)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="32468">MDSAL-531</key>
            <summary>Unable to resolve grouping</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="miro.kovac">Miroslav Kovac</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 Mar 2020 09:41:16 +0000</created>
                <updated>Tue, 18 May 2021 07:26:54 +0000</updated>
                            <resolved>Tue, 18 May 2021 07:26:54 +0000</resolved>
                                                    <fixVersion>6.0.0</fixVersion>
                                    <component>Binding codegen</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="67960" author="miro.kovac" created="Wed, 11 Mar 2020 09:47:23 +0000"  >&lt;p&gt;weird thing is that if we are not augmenting and we do following changes in module a:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;  augment &quot;/b:fooo&quot; {
    uses a:foo;
  }

changed to 

  container fooo {
    uses a:foo;
  }&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;So we do not need module b anymore. The generator does not have problem. And even more weird same goes if we keep augmentation but we augment the same container in same model. So again we do not need module b and the module a would change like this:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; augment &quot;/b:fooo&quot; {
   uses a:foo; 
 }

changed to 

 augment &quot;/a:fooo&quot; {
   uses a:foo; 
 }

 container fooo {
   leaf foo_leaf {
     type empty;
   } 
 }&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="68014" author="rovarga" created="Sat, 11 Apr 2020 15:15:44 +0000"  >&lt;p&gt;Version 6.0.0 is not affected as we do not need to resolve the path &#8211; we have the grouping readily available.&lt;/p&gt;</comment>
                            <comment id="68025" author="rovarga" created="Fri, 17 Apr 2020 19:36:04 +0000"  >&lt;p&gt;Right, and the problem seems to come from GroupingDependencySort &#8211; it is failing to reorder a:foo&apos;s grouping according to their dependencies, generating them in the declaration order. This means next-operation-group is not processed yet and hence its type does not exist yet.&lt;/p&gt;</comment>
                            <comment id="68026" author="rovarga" created="Fri, 17 Apr 2020 19:39:29 +0000"  >&lt;p&gt;So a workaround would be to reverse the order of definition of these two.&lt;/p&gt;</comment>
                            <comment id="68027" author="rovarga" created="Fri, 17 Apr 2020 19:46:59 +0000"  >&lt;p&gt;The sorting problem boils down to the two groupings being instantiated, i.e. having paths of:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;AbsoluteSchemaPath{path=[(b)fooo, (a)software-operation-state]}
AbsoluteSchemaPath{path=[(b)fooo, (a)next-operation-group]}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and the uses statement is pointing to original grouping:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;UsesEffectiveStatementImpl[groupingPath=AbsoluteSchemaPath{path=[(a)foo, (a)next-operation-group]}]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;So we end up not realizing that there is a dependency, as the pointer is all wrong.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03re7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>