Prune extra decoded children that should stay on the type definition only.#3843
Conversation
…xtra decoded children that should stay on the type definition such as Optional/Mandatory placeholders and ones that do not have Mandatory/Optional ModellingRules.
|
Hi @mrsuciu, this breaks any server using a nodeset which uses any instances below a folder node which is contained as |
|
@larws Thanks for raising the issue. The PR looked ok for what it meant to fix but it looks that there are side effects. The changes have made it through in the Pre-release. They will either be reverted or a more comprehensive fix has to be done. Do not update to the Pre-release for the moment. |
|
@larws can you explain why it would break? the pruning was to ensure compliance with the specification. we need to determine if it is failing because the bug gave you something that the spec does not allow or if the implementation of the pruning is resulting in models that are not compliant. |
|
@opcfoundation-org We use the Machinery Companion Spec and it's elements defined by that specification. The model compiler generates for children of the |
|
@larws HasAddIn is just a subtype of HasComponent and is otherwise the same as HasComponent. If you add a component to a type definition you need to set the modelling rule on the instance if you want it to be replicated in the instance. i.e. If ModellingRule_Mandatory or ModellingRule_Optional is omitted then the pruning is working as designed. Can you confirm that you do not have a ModellingRule defined on the HasAddIn Objects you have defined? |
|
Created a sample NodeSet: |
|
@opcfoundation-org In our nodeset the nodes with |
|
We will test with that sample NodeSet and see if there is a tool bug. |
…5.378.152 (#21) This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [OPCFoundation.NetStandard.Opc.Ua](https://github.com/OPCFoundation/UA-.NETStandard) | `1.5.378.145` → `1.5.378.152` |  |  | --- ### Release Notes <details> <summary>OPCFoundation/UA-.NETStandard (OPCFoundation.NetStandard.Opc.Ua)</summary> ### [`v1.5.378.152`](https://github.com/OPCFoundation/UA-.NETStandard/releases/tag/1.5.378.152): OPC UA 1.05 Maintenance Update [Compare Source](OPCFoundation/UA-.NETStandard@1.5.378.145...1.5.378.152) Maintenance Release for fixing bugs found on the main378 development branch. #### Released packages [OPCFoundation.NetStandard.Opc.Ua](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.Core](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Core/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.Security.Certificates](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Security.Certificates/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.Configuration](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Configuration/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.Server](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Server/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.Client](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Client/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.Bindings.Https](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Bindings.Https/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.PubSub](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.PubSub/1.5.378.152) #### What's Changed - Fix memory leak: dispose linked CancellationTokenSource in ChannelAsyncOperation.EndAsync by [@​romanett](https://github.com/romanett) with [@​Copilot](https://github.com/Copilot) in [#​3812](OPCFoundation/UA-.NETStandard#3812) - Fix Race condition in OnPublishComplete by [@​markuswallen](https://github.com/markuswallen) in [#​3837](OPCFoundation/UA-.NETStandard#3837) - \[master378] Use request.SessionId instead of request.Session.Id in the ReportAuditCancelEvent call from CancelRequests. by [@​mrsuciu](https://github.com/mrsuciu) in [#​3853](OPCFoundation/UA-.NETStandard#3853) - Prune extra decoded children that should stay on the type definition only. by [@​mrsuciu](https://github.com/mrsuciu) in [#​3843](OPCFoundation/UA-.NETStandard#3843) - \[Server] Fix NRE in ActivateSession if Session times out before activation completes by [@​romanett](https://github.com/romanett) in [#​3844](OPCFoundation/UA-.NETStandard#3844) - \[Server] Fix [#​3896](OPCFoundation/UA-.NETStandard#3896): send full certificate chain when CA is in the issuer store (1.5.x) by [@​marcschier](https://github.com/marcschier) in [#​3898](OPCFoundation/UA-.NETStandard#3898) - Synchronize ConditionState branch collection access by [@​marcschier](https://github.com/marcschier) with [@​Copilot](https://github.com/Copilot) in [#​3895](OPCFoundation/UA-.NETStandard#3895) - Prepare 1.5.378 maintenence release by [@​mrsuciu](https://github.com/mrsuciu) in [#​3893](OPCFoundation/UA-.NETStandard#3893) **Full Changelog**: <OPCFoundation/UA-.NETStandard@1.5.378.145...1.5.378.152> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDIuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI0Mi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Reviewed-on: https://codeberg.org/umati/connect/pulls/21
…r to 1.5.378.152 (#22) This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [OPCFoundation.NetStandard.Opc.Ua.Server](https://github.com/OPCFoundation/UA-.NETStandard) | `1.5.378.145` → `1.5.378.152` |  |  | --- ### Release Notes <details> <summary>OPCFoundation/UA-.NETStandard (OPCFoundation.NetStandard.Opc.Ua.Server)</summary> ### [`v1.5.378.152`](https://github.com/OPCFoundation/UA-.NETStandard/releases/tag/1.5.378.152): OPC UA 1.05 Maintenance Update [Compare Source](OPCFoundation/UA-.NETStandard@1.5.378.145...1.5.378.152) Maintenance Release for fixing bugs found on the main378 development branch. #### Released packages [OPCFoundation.NetStandard.Opc.Ua](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.Core](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Core/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.Security.Certificates](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Security.Certificates/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.Configuration](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Configuration/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.Server](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Server/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.Client](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Client/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.Bindings.Https](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Bindings.Https/1.5.378.152) [OPCFoundation.NetStandard.Opc.Ua.PubSub](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.PubSub/1.5.378.152) #### What's Changed - Fix memory leak: dispose linked CancellationTokenSource in ChannelAsyncOperation.EndAsync by [@​romanett](https://github.com/romanett) with [@​Copilot](https://github.com/Copilot) in [#​3812](OPCFoundation/UA-.NETStandard#3812) - Fix Race condition in OnPublishComplete by [@​markuswallen](https://github.com/markuswallen) in [#​3837](OPCFoundation/UA-.NETStandard#3837) - \[master378] Use request.SessionId instead of request.Session.Id in the ReportAuditCancelEvent call from CancelRequests. by [@​mrsuciu](https://github.com/mrsuciu) in [#​3853](OPCFoundation/UA-.NETStandard#3853) - Prune extra decoded children that should stay on the type definition only. by [@​mrsuciu](https://github.com/mrsuciu) in [#​3843](OPCFoundation/UA-.NETStandard#3843) - \[Server] Fix NRE in ActivateSession if Session times out before activation completes by [@​romanett](https://github.com/romanett) in [#​3844](OPCFoundation/UA-.NETStandard#3844) - \[Server] Fix [#​3896](OPCFoundation/UA-.NETStandard#3896): send full certificate chain when CA is in the issuer store (1.5.x) by [@​marcschier](https://github.com/marcschier) in [#​3898](OPCFoundation/UA-.NETStandard#3898) - Synchronize ConditionState branch collection access by [@​marcschier](https://github.com/marcschier) with [@​Copilot](https://github.com/Copilot) in [#​3895](OPCFoundation/UA-.NETStandard#3895) - Prepare 1.5.378 maintenence release by [@​mrsuciu](https://github.com/mrsuciu) in [#​3893](OPCFoundation/UA-.NETStandard#3893) **Full Changelog**: <OPCFoundation/UA-.NETStandard@1.5.378.145...1.5.378.152> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDIuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI0OS41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Reviewed-on: https://codeberg.org/umati/connect/pulls/22
|
@opcfoundation-org With https://github.com/larws/repro-issue-3843 you can reproduce the issue I am talking about. I generated the code for your demo nodeset with the current model compiler version and added it to a server. With version 1.5.378.152 it does not work, the |
…nition only. (#3843)" (#3976) This reverts commit 00519fa. # Description Due to longer investigation time needed on ModelCompiler the pruning of the extra decoded children that should stay on the type definition only is reverted ## Related Issues _Reference all GitHub issues this PR addresses. If there is no issue yet, open one and link it here._ _If this is a relatively large or complex change, a design must have been discussed in the related tracking issue and signed off (which becomes the Architectural Decision Record (ADR))._ - Fixes #github-issue-number, ... ## Checklist _Put an `x` in the boxes that apply. You can complete these step by step after opening the PR._ - [ ] I have signed the [CLA](https://opcfoundation.org/license/cla/ContributorLicenseAgreementv1.0.pdf) and read the [CONTRIBUTING](https://github.com/OPCFoundation/UA-.NETStandard/blob/master/CONTRIBUTING.md) doc. - [ ] I have added tests that prove my fix is effective or that my feature works and increased code coverage. - [ ] I have added all necessary documentation. - [ ] I have verified that my changes do not introduce (new) build or analyzer warnings. - [ ] I ran **all** tests locally using the **UA.slnx** solution against at least .net **framework** and .net **10**, and all passed. - [ ] I fixed **all** failing and flaky tests in the CI pipelines and **all** CodeQL warnings. - [ ] I have addressed **all** PR feedback received.
Keep the generated children that belong on instances, and prune the extra decoded children that should stay on the type definition only, such as Optional/Mandatory placeholders and ones that do not have Mandatory/Optional ModellingRules.
Description
Currently child nodes that are type definition detailes such as ones that do not have Mandatory/Optional ModellingRules are instantiated in the runtime instance of such type definitions. This PR proposes to correct this behaviour during NodeState creation as an alternative from it being fixed by the ModelCompiler.
Related Issues
Checklist
Put an
xin the boxes that apply. You can complete these step by step after opening the PR.