Skip to content

Conversation

@marcschier
Copy link
Collaborator

@marcschier marcschier commented Oct 2, 2025

Proposed changes

Added obsoleted methods to ensure .net samples compile (almost) unchanged.

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

@marcschier marcschier requested a review from Copilot October 2, 2025 06:34
@codecov
Copy link

codecov bot commented Oct 2, 2025

Codecov Report

❌ Patch coverage is 43.36283% with 64 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.52%. Comparing base (8e7a73c) to head (c608ced).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
Stack/Opc.Ua.Core/Stack/Client/DiscoveryClient.cs 23.80% 30 Missing and 2 partials ⚠️
Libraries/Opc.Ua.Client/Session/Session.cs 61.29% 10 Missing and 2 partials ⚠️
...Ua.Core/Stack/Configuration/ConfiguredEndpoints.cs 0.00% 6 Missing ⚠️
...es/Opc.Ua.Client.ComplexTypes/ComplexTypeSystem.cs 0.00% 2 Missing ⚠️
Libraries/Opc.Ua.Client/Browser.cs 0.00% 2 Missing ⚠️
...a.Gds.Client.Common/GlobalDiscoveryServerClient.cs 60.00% 2 Missing ⚠️
...Ua.Gds.Client.Common/LocalDiscoveryServerClient.cs 0.00% 2 Missing ⚠️
Stack/Opc.Ua.Core/Stack/Client/SessionChannel.cs 33.33% 2 Missing ⚠️
...Ua.Client/Session/Factory/DefaultSessionFactory.cs 0.00% 1 Missing ⚠️
...Gds.Client.Common/ServerPushConfigurationClient.cs 75.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3234      +/-   ##
==========================================
- Coverage   57.59%   57.52%   -0.08%     
==========================================
  Files         361      361              
  Lines       79152    79163      +11     
  Branches    13814    13821       +7     
==========================================
- Hits        45587    45537      -50     
- Misses      29336    29397      +61     
  Partials     4229     4229              

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

@marcschier marcschier requested a review from romanett October 2, 2025 06:34
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 obsolete methods and constructors to ensure .NET samples compile with minimal changes when upgrading to a version that requires telemetry context parameters. The changes preserve backward compatibility by providing deprecated overloads that internally call the new telemetry-enabled constructors with fallback values.

Key changes include:

  • Adding obsolete constructors and methods that omit ITelemetryContext parameters
  • Updating existing code to use the new constructor signatures
  • Renaming LogInformation to LogInfo for consistency

Reviewed Changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Tests/Opc.Ua.Gds.Tests/ServerConfigurationPushTestClient.cs Updated constructor call to remove telemetry parameter
Tests/Opc.Ua.Client.Tests/TraceableRequestHeaderClientSessionFactory.cs Removed telemetry parameters from session creation
Tests/Opc.Ua.Client.Tests/TraceableRequestHeaderClientSession.cs Updated constructors to remove telemetry parameters
Tests/Opc.Ua.Client.Tests/TestableSession.cs Removed telemetry parameter from constructor call
Tests/Opc.Ua.Client.Tests/ReverseConnectTest.cs Updated DiscoveryClient.Create call to remove telemetry
Tests/Opc.Ua.Client.Tests/ClientTest.cs Updated base constructor call to remove telemetry
Stack/Opc.Ua.Core/Types/Utils/UtilsObsolete.cs Renamed LogInformation methods to LogInfo and updated references
Stack/Opc.Ua.Core/Types/Utils/ServiceMessageContext.cs Added obsolete parameterless constructor
Stack/Opc.Ua.Core/Types/Utils/DataGenerator.cs Added obsolete constructor without telemetry parameter
Stack/Opc.Ua.Core/Types/BuiltIn/DiagnosticInfo.cs Added obsolete constructors without logger parameter
Stack/Opc.Ua.Core/Stack/Nodes/IFilterTarget.cs Added obsolete FilterContext constructors
Stack/Opc.Ua.Core/Stack/Configuration/SecurityConfigurationManager.cs Added obsolete parameterless constructor
Stack/Opc.Ua.Core/Stack/Configuration/ConfiguredEndpoints.cs Added obsolete UpdateFromServerAsync overloads
Stack/Opc.Ua.Core/Stack/Client/UserIdentity.cs Refactored constructors and added obsolete X509IdentityToken constructor
Stack/Opc.Ua.Core/Stack/Client/UaChannelBase.cs Removed telemetry parameters from CreateUaBinaryChannel methods
Stack/Opc.Ua.Core/Stack/Client/SessionChannel.cs Removed telemetry parameters from Create methods
Stack/Opc.Ua.Core/Stack/Client/RegistrationClient.cs Updated Create method call to remove telemetry parameter
Stack/Opc.Ua.Core/Stack/Client/DiscoveryClient.cs Added obsolete Create method overloads and updated implementations
Stack/Opc.Ua.Core/Security/Certificates/CertificateValidator.cs Added obsolete parameterless constructor
Stack/Opc.Ua.Core/Security/Certificates/CertificateIdentifier.cs Added obsolete OpenStore method without telemetry
Stack/Opc.Ua.Core/Security/Certificates/CertificateFactory.cs Added obsolete Create and Load methods without telemetry
Libraries/Opc.Ua.Server/ServerUtils.cs Added obsolete CreateDiagnosticInfo method
Libraries/Opc.Ua.Server/Aggregates/Aggregators.cs Added obsolete CreateStandardCalculator method
Libraries/Opc.Ua.Server/Aggregates/AggregateCalculator.cs Added obsolete constructor
Libraries/Opc.Ua.Gds.Server.Common/CertificateGroup.cs Added obsolete parameterless constructor
Libraries/Opc.Ua.Gds.Client.Common/ServerPushConfigurationClient.cs Updated constructor and removed telemetry field
Libraries/Opc.Ua.Gds.Client.Common/LocalDiscoveryServerClient.cs Updated constructor to remove telemetry parameter
Libraries/Opc.Ua.Gds.Client.Common/GlobalDiscoveryServerClient.cs Updated constructor and removed telemetry field
Libraries/Opc.Ua.Client/Subscription/Subscription.cs Added obsolete parameterless constructor
Libraries/Opc.Ua.Client/Session/SessionClientBatched.cs Updated constructor to remove telemetry parameter
Libraries/Opc.Ua.Client/Session/Session.cs Updated constructors and methods to remove telemetry parameters
Libraries/Opc.Ua.Client/Session/Factory/DefaultSessionFactory.cs Updated method calls to remove telemetry parameters
Libraries/Opc.Ua.Client/CoreClientUtils.cs Added obsolete SelectEndpointAsync overloads
Libraries/Opc.Ua.Client/Browser.cs Added constructor overload that uses session's telemetry
Libraries/Opc.Ua.Client.ComplexTypes/ComplexTypeSystem.cs Updated constructors to use session's telemetry context

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

@marcschier marcschier merged commit 845c31d into master Oct 3, 2025
118 of 120 checks passed
@marcschier marcschier deleted the sourcegen branch October 3, 2025 12:20
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.

4 participants