-
Notifications
You must be signed in to change notification settings - Fork 132
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
feat: add support for .NET SDK V4 #279
Conversation
@@ -229,15 +229,22 @@ public void Flush() | |||
} | |||
} | |||
} | |||
|
|||
|
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.
In the LogEventTransmissionSetup
there needs to be a null check when checking the log group collection after calling DescribeLogGroupsAsync
.
Also the the PutLogEventsRequest _request
field in AWSLoggerCore
is initialized the LogEvents
collection is never initialized. I think you need to change the line
public PutLogEventsRequest _request = new PutLogEventsRequest();
to
public PutLogEventsRequest _request = new PutLogEventsRequest {LogEvents = new List<InputLogEvent>() };
Not related to your change but I don't know why the _request
field is public. Can you try and make that private and see if there are any issues. My quick scan shows it only used in AWSLoggerCore
.
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.
I addressed your comments.
As for the public field, it is defined inside the LogEventBatch
class and then accessed from AWSLoggerCore
. So it needs to be public.
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.
I wanted to build the packages locally to make sure they still looked right with all of the project file changes but I'm getting the following errors when I run dotnet msbuild build.proj
> dotnet msbuild .\build.proj
build failed with 5 error(s) and 4 warning(s) (3.2s)
C:\codebase\aws-logging-dotnet\test\AWS.Logger.SeriLog.Tests\AWS.Logger.SeriLog.Tests.csproj : error NU1903: Warning As Error: Package 'System.Text.Json' 8.0.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-8g4q-xg66-9fp4 [C:\codebase\aws-logging-dotnet\AWS.Logger.sln]
C:\codebase\aws-logging-dotnet\test\AWS.Logger.AspNetCore.Tests\AWS.Logger.AspNetCore.Tests.csproj : error NU1903: Warning As Error: Package 'System.Text.Json' 8.0.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-8g4q-xg66-9fp4 [C:\codebase\aws-logging-dotnet\AWS.Logger.sln]
C:\codebase\aws-logging-dotnet\test\AWS.Logger.AspNetCore.Tests\AWS.Logger.AspNetCore.Tests.csproj : error NU1903: Warning As Error: Package 'System.Text.Json' 8.0.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-hh2w-p6rv-4g7w [C:\codebase\aws-logging-dotnet\AWS.Logger.sln]
C:\codebase\aws-logging-dotnet\test\AWS.Logger.SeriLog.Tests\AWS.Logger.SeriLog.Tests.csproj : error NU1903: Warning As Error: Package 'System.Text.Json' 8.0.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-hh2w-p6rv-4g7w [C:\codebase\aws-logging-dotnet\AWS.Logger.sln]
C:\codebase\aws-logging-dotnet\samples\Serilog\SerilogTestCodeFromConfigRestrictedToMinimumLevel\SerilogTestCodeFromConfigRestrictedToMinimumLevel.csproj : warning NU1903: Package 'System.Text.Json' 8.0.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-8g4q-xg66-9fp4 [C:\codebase\aws-logging-dotnet\AWS.Logger.sln]
C:\codebase\aws-logging-dotnet\samples\Serilog\SerilogTestCodeFromConfigRestrictedToMinimumLevel\SerilogTestCodeFromConfigRestrictedToMinimumLevel.csproj : warning NU1903: Package 'System.Text.Json' 8.0.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-hh2w-p6rv-4g7w [C:\codebase\aws-logging-dotnet\AWS.Logger.sln]
C:\codebase\aws-logging-dotnet\samples\Serilog\SerilogTestCodeFromConfig\SerilogTestCodeFromConfig.csproj : warning NU1903: Package 'System.Text.Json' 8.0.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-8g4q-xg66-9fp4 [C:\codebase\aws-logging-dotnet\AWS.Logger.sln]
C:\codebase\aws-logging-dotnet\samples\Serilog\SerilogTestCodeFromConfig\SerilogTestCodeFromConfig.csproj : warning NU1903: Package 'System.Text.Json' 8.0.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-hh2w-p6rv-4g7w [C:\codebase\aws-logging-dotnet\AWS.Logger.sln]
C:\codebase\aws-logging-dotnet\build.proj(10,7): error MSB3073: The command "dotnet restore AWS.Logger.sln" exited with code 1.
7912fd9
to
0f39fec
Compare
You are probably seeing those because you .NET9 installed. I didn't get those errors locally and in the build system with .NET8. I updated the problematic dependencies and tested them with .NET9. |
Issue #, if available:
DOTNET-7758
Description of changes:
4.0.0-preview.4
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.