-
Notifications
You must be signed in to change notification settings - Fork 1k
Add API back as Obsolete for samples to compile (almost) unchanged. #3234
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
Conversation
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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
LogInformationtoLogInfofor 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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Proposed changes
Added obsoleted methods to ensure .net samples compile (almost) unchanged.
Related Issues
Types of changes
What types of changes does your code introduce?
Put an
xin the boxes that apply. You can also fill these out after creating the PR.Checklist
Put an
xin 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.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...