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

Some cleanup of the new APIs and Union implementation. #2927

Merged
merged 9 commits into from
Jan 17, 2025

Conversation

mregen
Copy link
Contributor

@mregen mregen commented Jan 8, 2025

Proposed changes

  • Simplify some of the test cases for Unions
  • Simplify some of the new IEncoder API
  • Try use the new API for reading/writning encodingmask&switchfield
  • make a few helpers in JsonEncoder private, that seem only to be used internally

Enhancements to Encoding/Decoding Methods:

Configuration Improvements:

Project Settings and Cleanup:

Miscellaneous Fixes:

  • CustomNodeManager.cs: Renamed variable error to callResult and ensured the actual result of the original call is returned. [1] [2]
  • README.md: Corrected the release month from December to January.

Related Issues

  • Fixes #

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply. You can also fill these out after creating the PR.

  • Bugfix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • Test enhancement (non-breaking change to increase test coverage)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected, requires version increase of Nuget packages)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc.
  • I have signed the CLA.
  • I ran tests locally with my changes, all passed.
  • I fixed all failing tests in the CI pipelines.
  • I fixed all introduced issues with CodeQL and LGTM.
  • I have added tests that prove my fix is effective or that my feature works and increased code coverage.
  • I have added necessary documentation (if appropriate).
  • Any dependent changes have been merged and published in downstream modules.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@mregen mregen requested a review from randy-armstrong January 8, 2025 12:12
@mregen mregen marked this pull request as ready for review January 8, 2025 12:15
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 62.81407% with 296 lines in your changes missing coverage. Please review.

Project coverage is 54.80%. Comparing base (444b2c8) to head (62cfe44).
Report is 37 commits behind head on 1.05.04-final-release-fixes.

Files with missing lines Patch % Lines
Stack/Opc.Ua.Core/Types/Encoders/JsonEncoder.cs 51.85% 151 Missing and 18 partials ⚠️
Stack/Opc.Ua.Core/Types/Encoders/JsonDecoder.cs 68.42% 88 Missing and 26 partials ⚠️
...c.Ua.Client.ComplexTypes/Types/UnionComplexType.cs 85.71% 2 Missing and 1 partial ⚠️
Stack/Opc.Ua.Core/Schema/UANodeSet.cs 50.00% 3 Missing ⚠️
...a.Configuration/ApplicationConfigurationBuilder.cs 50.00% 2 Missing ⚠️
Stack/Opc.Ua.Core/Types/BuiltIn/ExtensionObject.cs 0.00% 1 Missing and 1 partial ⚠️
Stack/Opc.Ua.Core/Types/Utils/ServiceResult.cs 33.33% 1 Missing and 1 partial ⚠️
...es/Opc.Ua.PubSub/Transport/MqttPubSubConnection.cs 88.88% 1 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           1.05.04-final-release-fixes    #2927    +/-   ##
=============================================================
  Coverage                        54.79%   54.80%            
=============================================================
  Files                              349      349            
  Lines                            66372    66680   +308     
  Branches                         13622    13738   +116     
=============================================================
+ Hits                             36371    36543   +172     
- Misses                           26011    26130   +119     
- Partials                          3990     4007    +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

larws and others added 3 commits January 8, 2025 13:36
* #2896: Write output arguments for good and uncertain status code

When a method state's call method is invoked the output arguments should be written in case the status code is good or uncertain. This behavior would be conform with the current specification.

* #2896: The service result corresponds the method call result

The result of the Call method in the CustomNodeManager2 class represents the status of the CallMethodResult. It does not correspond to the ServiceResult of the CallResponse, thus returning Good as a general response is incorrect behavior.
…nConfigurationBuilder (#2909)

Add the method SetHiResClockDisabled to IApplicationConfigurationBuilder
Fix the type of RejectedStore Created by the Builder to: CertificateStoreIdentifier
Merge cherrypicks from master in develop branch
Copy link
Contributor

@opcfoundation-org opcfoundation-org left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. IncludeDefaultValues = false for MetaDataMessages (CompactEncoding only).

@mregen
Copy link
Contributor Author

mregen commented Jan 13, 2025

working on some improvements to use StringCollection instead of an EnumType in the Switchfield API. Also try to move some of the logic to the encoders.

@mregen mregen merged commit 658fa77 into 1.05.04-final-release-fixes Jan 17, 2025
241 of 244 checks passed
@mregen mregen deleted the 1.05.04-prfeedback branch January 17, 2025 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants