Skip to content

Conversation

@romanett
Copy link
Contributor

Proposed changes

This PR make the ClientBase class set a default Operation Timeout that allows the server to cancel longrunning requests after the Timeout expired.

Types of changes

  • 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

  • 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...

@romanett romanett requested a review from Copilot August 26, 2025 12:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a default timeout hint mechanism to the ClientBase class by setting the TimeoutHint in request headers based on the OperationTimeout of the transport channel when no explicit timeout is provided.

  • Automatically sets TimeoutHint to the OperationTimeout value when it's not explicitly specified (value is 0)
  • Enables servers to cancel long-running requests after the timeout period expires
  • Improves request management by providing default timeout behavior

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

❌ Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.66%. Comparing base (47b360d) to head (cea2c38).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ibraries/Opc.Ua.Client/Session/TraceableSession.cs 0.00% 2 Missing ⚠️
Stack/Opc.Ua.Core/Stack/Client/ClientBase.cs 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3178   +/-   ##
=======================================
  Coverage   57.65%   57.66%           
=======================================
  Files         365      365           
  Lines       79412    79419    +7     
  Branches    13862    13865    +3     
=======================================
+ Hits        45788    45798   +10     
- Misses      29370    29373    +3     
+ Partials     4254     4248    -6     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@romanett romanett changed the title [CLient] Set default timout hint based on OperationTimeout of the TransportChannel [Client] Set default timout hint based on OperationTimeout of the TransportChannel Aug 27, 2025
@romanett romanett marked this pull request as draft August 28, 2025 04:05
@romanett
Copy link
Contributor Author

romanett commented Sep 5, 2025

Better Introduce a separate Property to allow to configure the "DefaultServiceCallTimeoutHint"

@romanett romanett added this to the 1.5.378 Async Server Update 2 milestone Sep 7, 2025
@romanett romanett marked this pull request as ready for review October 12, 2025 10:44
@romanett romanett requested a review from marcschier October 12, 2025 10:44
@marcschier marcschier merged commit 2bee7e1 into OPCFoundation:master Oct 13, 2025
76 of 77 checks passed
@romanett romanett deleted the setDefaultTimoutHint branch October 13, 2025 05:53
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.

2 participants