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

Make async service call use awaitable, session open improvements #2318

Merged
merged 8 commits into from
Sep 22, 2023

Conversation

mregen
Copy link
Contributor

@mregen mregen commented Sep 21, 2023

Proposed changes

  • Improvements when many sessions need to be opened
  • Introduce a OpenAsync version which usesmore async calls for session creation
  • add async interfaces to cert validator
  • refactor lock of encodeable factory
  • add a EndAsync property to WriteRequest to allow to await a service call
  • add a EndSendRequestAsync method to allow implementation of awaitable service calls

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 marked this pull request as ready for review September 21, 2023 17:44
@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Patch coverage: 68.54% and project coverage change: -0.06% ⚠️

Comparison is base (229b124) 59.07% compared to head (ec20ed1) 59.01%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2318      +/-   ##
==========================================
- Coverage   59.07%   59.01%   -0.06%     
==========================================
  Files         330      330              
  Lines       63331    63646     +315     
==========================================
+ Hits        37413    37561     +148     
- Misses      25918    26085     +167     
Files Changed Coverage Δ
Libraries/Opc.Ua.Client/NodeCache.cs 70.04% <0.00%> (-1.42%) ⬇️
Libraries/Opc.Ua.Client/TraceableSession.cs 49.39% <0.00%> (-1.05%) ⬇️
...indings.Https/Stack/Https/HttpsTransportChannel.cs 77.38% <0.00%> (-0.40%) ⬇️
Stack/Opc.Ua.Core/Stack/Client/UaChannelBase.cs 21.24% <0.00%> (-0.34%) ⬇️
...k/Opc.Ua.Core/Stack/Tcp/UaSCBinaryClientChannel.cs 62.87% <48.83%> (-2.02%) ⬇️
Libraries/Opc.Ua.Client/Session.cs 68.53% <51.70%> (-1.71%) ⬇️
...ack/Opc.Ua.Core/Stack/Tcp/ChannelAsyncOperation.cs 63.43% <61.53%> (-1.52%) ⬇️
...ck/Opc.Ua.Core/Types/Encoders/EncodeableFactory.cs 68.38% <68.65%> (-4.55%) ⬇️
...pc.Ua.Core/Stack/Tcp/UaSCBinaryTransportChannel.cs 87.60% <83.33%> (-0.33%) ⬇️
...Core/Security/Certificates/CertificateValidator.cs 80.08% <85.50%> (-0.66%) ⬇️
... and 3 more

... and 15 files with indirect coverage changes

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

@mregen mregen merged commit 5af60ef into OPCFoundation:master Sep 22, 2023
44 of 45 checks passed
@mregen mregen deleted the openasync branch September 22, 2023 05:45
@mregen mregen added this to the 1.4.372 updates milestone Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants