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

Use JSON polymorphism with .NET 9 RC2 #1434

Closed
wants to merge 23 commits into from
Closed

Conversation

martincostello
Copy link
Owner

Debugging for #1430.

martincostello and others added 10 commits September 11, 2024 22:49
Use JSON polymorphism to (de)serialize Alexa requests and responses.
Update to the latest daily build of .NET 9.
Attempt to debug JSON payloads.
* Update .NET SDK

Update .NET SDK to version 9.0.100-rc.2.24462.3.

---
updated-dependencies:
- dependency-name: Microsoft.NET.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com>

* Bump .NET NuGet packages

Bumps .NET dependencies to their latest versions for the .NET 9.0.100-rc.2.24462.3 SDK.

Bumps Microsoft.AspNetCore.WebUtilities from 9.0.0-rc.2.24460.5 to 9.0.0-rc.2.24461.26.
Bumps Microsoft.Extensions.Configuration.Binder from 9.0.0-rc.2.24459.11 to 9.0.0-rc.2.24461.13.
Bumps Microsoft.Extensions.Configuration.EnvironmentVariables from 9.0.0-rc.2.24459.11 to 9.0.0-rc.2.24461.13.
Bumps Microsoft.Extensions.Configuration.Json from 9.0.0-rc.2.24459.11 to 9.0.0-rc.2.24461.13.
Bumps Microsoft.Extensions.DependencyInjection from 9.0.0-rc.2.24459.11 to 9.0.0-rc.2.24461.13.
Bumps Microsoft.Extensions.Http from 9.0.0-rc.2.24459.11 to 9.0.0-rc.2.24461.13.
Bumps Microsoft.Extensions.Logging.Console from 9.0.0-rc.2.24459.11 to 9.0.0-rc.2.24461.13.
Bumps System.Text.Json from 9.0.0-rc.2.24459.11 to 9.0.0-rc.2.24461.13.

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.WebUtilities
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Extensions.Configuration.Binder
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Extensions.Configuration.EnvironmentVariables
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Extensions.Configuration.Json
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Extensions.DependencyInjection
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Extensions.Http
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Microsoft.Extensions.Logging.Console
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: System.Text.Json
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com>

---------

Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com>
Add more logging to see where the hang is happening.
Avoid deadlock in AoT tests when writing to the console.
Disable the tests entirely - will probably cause a deadlock when deployed, but let's see...
Do not await the handler to see if the things get logged.
Disable logging to the console.
@martincostello
Copy link
Owner Author

/deploy

Copy link

github-actions bot commented Sep 12, 2024

🧪 Tests for deployment to dev failed ❌

Copy link

Payload Duration Billed Duration Memory Size Max Memory Used Init Duration Trace
Launch 10093.21 ms 10375 ms 192 MB 66 MB 374.80 ms 🔗
Disruption 10131.19 ms 10000 ms 192 MB 58 MB - 🔗
Cancel 10067.96 ms 10000 ms 192 MB 57 MB - 🔗
UnknownIntent 10040.27 ms 10000 ms 192 MB 58 MB - 🔗
Stop 10114.53 ms 10000 ms 192 MB 56 MB - 🔗
SessionEnded 10238.50 ms 10000 ms 192 MB 58 MB - 🔗
Status 10045.02 ms 10000 ms 192 MB 57 MB - 🔗
Help 10102.40 ms 10000 ms 192 MB 58 MB - 🔗

What happens if we force things to try and not be async...
@martincostello
Copy link
Owner Author

/deploy

Copy link

github-actions bot commented Sep 12, 2024

🧪 Tests for deployment to dev failed ❌

Go back to being async.
Copy link

Payload Duration Billed Duration Memory Size Max Memory Used Init Duration Trace
Launch 10097.29 ms 10400 ms 192 MB 66 MB 399.22 ms 🔗
Disruption 10128.50 ms 10000 ms 192 MB 58 MB - -
Cancel 10055.18 ms 10000 ms 192 MB 57 MB - 🔗
UnknownIntent 10133.19 ms 10000 ms 192 MB 58 MB - 🔗
Stop 10051.45 ms 10000 ms 192 MB 57 MB - 🔗
SessionEnded 10071.33 ms 10000 ms 192 MB 58 MB - 🔗
Status 10068.59 ms 10000 ms 192 MB 58 MB - 🔗
Help 10087.10 ms 10000 ms 192 MB 58 MB - 🔗

Disable AoT.
@martincostello
Copy link
Owner Author

/deploy

Copy link

github-actions bot commented Sep 12, 2024

🧪 Tests for deployment to dev passed ✅

Copy link

Payload Duration Billed Duration Memory Size Max Memory Used Init Duration Trace
Launch 9509.55 ms 10648 ms 192 MB 118 MB 1138.14 ms 🔗
Disruption 10761.91 ms 11214 ms 192 MB 125 MB 1213.99 ms 🔗
Cancel 10870.97 ms 10000 ms 192 MB 94 MB - 🔗
UnknownIntent 9129.24 ms 9130 ms 192 MB 107 MB - 🔗
Stop 902.74 ms 903 ms 192 MB 120 MB - 🔗
SessionEnded 1735.43 ms 1736 ms 192 MB 132 MB - 🔗
Status 6380.32 ms 6381 ms 192 MB 151 MB - 🔗
Help 98.81 ms 99 ms 192 MB 152 MB - 🔗

Copy link

Payload Duration Billed Duration Memory Size Max Memory Used Init Duration Trace
Launch 157.47 ms 158 ms 192 MB 152 MB - 🔗
Disruption 440.55 ms 441 ms 192 MB 153 MB - 🔗
Cancel 63.14 ms 64 ms 192 MB 153 MB - 🔗
UnknownIntent 74.74 ms 75 ms 192 MB 153 MB - 🔗
Stop 39.00 ms 39 ms 192 MB 153 MB - 🔗
SessionEnded 116.15 ms 117 ms 192 MB 154 MB - 🔗
Status 998.15 ms 999 ms 192 MB 154 MB - 🔗
Help 76.91 ms 77 ms 192 MB 154 MB - 🔗

Skip using the base class.
Fix typo.
Call the original method.
@martincostello
Copy link
Owner Author

/deploy

Copy link

github-actions bot commented Sep 12, 2024

🧪 Tests for deployment to dev passed ✅

Copy link

Payload Duration Billed Duration Memory Size Max Memory Used Init Duration Trace
Launch 8988.32 ms 10134 ms 192 MB 118 MB 1145.12 ms 🔗
Disruption 8580.64 ms 8581 ms 192 MB 149 MB - 🔗
Cancel 78.59 ms 79 ms 192 MB 149 MB - 🔗
UnknownIntent 88.49 ms 89 ms 192 MB 149 MB - 🔗
Stop 40.17 ms 41 ms 192 MB 149 MB - 🔗
SessionEnded 647.13 ms 648 ms 192 MB 150 MB - 🔗
Status 1319.36 ms 1320 ms 192 MB 150 MB - 🔗
Help 67.91 ms 68 ms 192 MB 150 MB - 🔗

Re-enable AoT.
Copy link

github-actions bot commented Sep 12, 2024

🧪 Tests for deployment to dev failed ❌

Copy link

Payload Duration Billed Duration Memory Size Max Memory Used Init Duration Trace
Launch 258.88 ms 665 ms 192 MB 71 MB 405.63 ms 🔗
Disruption 66.85 ms 67 ms 192 MB 72 MB - 🔗
Cancel 85.16 ms 86 ms 192 MB 73 MB - 🔗
UnknownIntent 27.33 ms 28 ms 192 MB 73 MB - 🔗
Stop 27.25 ms 28 ms 192 MB 73 MB - 🔗
SessionEnded 26.92 ms 27 ms 192 MB 73 MB - 🔗
Status 27.20 ms 28 ms 192 MB 73 MB - 🔗
Help 27.03 ms 28 ms 192 MB 73 MB - 🔗

@martincostello
Copy link
Owner Author

/deploy

Copy link

github-actions bot commented Sep 12, 2024

🧪 Tests for deployment to dev failed ❌

Copy link

Payload Duration Billed Duration Memory Size Max Memory Used Init Duration Trace
Launch 10040.06 ms 10385 ms 192 MB 67 MB 384.10 ms 🔗
Disruption 10060.63 ms 10000 ms 192 MB 59 MB - 🔗
Cancel 10118.33 ms 10000 ms 192 MB 59 MB - 🔗
UnknownIntent 10085.45 ms 10000 ms 192 MB 59 MB - 🔗
Stop 10090.94 ms 10000 ms 192 MB 58 MB - 🔗
SessionEnded 10104.53 ms 10000 ms 192 MB 59 MB - 🔗
Status 10104.59 ms 10000 ms 192 MB 58 MB - 🔗
Help 10067.77 ms 10000 ms 192 MB 59 MB - 🔗

Add reference to Microsoft.Dotnet.ILCompiler containing a fix for what may be the cause.
Try to fix error from cross-compilation.
@martincostello
Copy link
Owner Author

/deploy

Copy link

github-actions bot commented Sep 12, 2024

🧪 Tests for deployment to dev passed ✅

Copy link

Payload Duration Billed Duration Memory Size Max Memory Used Init Duration Trace
Launch 1385.15 ms 1784 ms 192 MB 85 MB 398.75 ms 🔗
Disruption 1269.07 ms 1270 ms 192 MB 95 MB - 🔗
Cancel 26.84 ms 27 ms 192 MB 95 MB - 🔗
UnknownIntent 34.75 ms 35 ms 192 MB 95 MB - 🔗
Stop 27.35 ms 28 ms 192 MB 95 MB - 🔗
SessionEnded 65.19 ms 66 ms 192 MB 95 MB - 🔗
Status 143.41 ms 144 ms 192 MB 95 MB - 🔗
Help 77.33 ms 78 ms 192 MB 96 MB - 🔗

Get back to how it should be as much as possible.
@martincostello martincostello changed the base branch from main to json-polymorphism September 12, 2024 16:39
Re-enable the tests.
@martincostello martincostello changed the base branch from json-polymorphism to dotnet-vnext September 12, 2024 16:56
@martincostello martincostello changed the base branch from dotnet-vnext to dotnet-nightly September 12, 2024 16:56
@martincostello martincostello changed the base branch from dotnet-nightly to main September 12, 2024 16:56
@martincostello martincostello changed the base branch from main to json-polymorphism September 12, 2024 16:56
@martincostello martincostello changed the base branch from json-polymorphism to main September 12, 2024 16:57
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.27%. Comparing base (16aded5) to head (5709886).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1434      +/-   ##
==========================================
+ Coverage   93.23%   93.27%   +0.04%     
==========================================
  Files          45       49       +4     
  Lines         606      610       +4     
  Branches       55       55              
==========================================
+ Hits          565      569       +4     
  Misses         24       24              
  Partials       17       17              
Flag Coverage Δ
linux 93.27% <100.00%> (+0.04%) ⬆️
macos 93.27% <100.00%> (+0.04%) ⬆️
windows 93.27% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@martincostello
Copy link
Owner Author

/deploy

Copy link

github-actions bot commented Sep 12, 2024

Deployment to dev failed ❌

@martincostello
Copy link
Owner Author

/deploy

Copy link

github-actions bot commented Sep 12, 2024

🧪 Tests for deployment to dev passed ✅

Copy link

Payload Duration Billed Duration Memory Size Max Memory Used Init Duration Trace
Launch 1352.364 1746 192 86 392.688 🔗
Disruption 1216.351 1217 192 96 - 🔗
Cancel 82.15 83 192 96 - 🔗
UnknownIntent 85.249 86 192 96 - 🔗
Stop 37.825 38 192 97 - 🔗
SessionEnded 56.742 57 192 97 - 🔗
Status 128.451 129 192 97 - 🔗
Help 28.025 29 192 97 - 🔗

@martincostello martincostello deleted the json-polymorphism-rc2 branch September 12, 2024 17:10
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