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

ResponseCompressionMiddlewareTests failing in release/8.0 on Fedora41 #59870

Open
wtgodbe opened this issue Jan 14, 2025 · 7 comments
Open

ResponseCompressionMiddlewareTests failing in release/8.0 on Fedora41 #59870

wtgodbe opened this issue Jan 14, 2025 · 7 comments
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware test-failure

Comments

@wtgodbe
Copy link
Member

wtgodbe commented Jan 14, 2025

Failing Test(s)

  • Failed Microsoft.AspNetCore.ResponseCompression.Tests.ResponseCompressionMiddlewareTest.SendFileAsync_AfterFirstWrite_CompressesAndFlushes

Error Message

2025-01-14T10:02:12.7516868Z Expected: 46
2025-01-14T10:02:12.7516920Z Actual:   43

Stacktrace

2025-01-14T10:02:12.7532953Z      at Microsoft.AspNetCore.ResponseCompression.Tests.ResponseCompressionMiddlewareTest.CheckResponseCompressed(HttpResponseMessage response, Nullable`1 expectedBodyLength, String expectedEncoding) in /_/src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs:line 1303
2025-01-14T10:02:12.7533052Z    at Microsoft.AspNetCore.ResponseCompression.Tests.ResponseCompressionMiddlewareTest.SendFileAsync_AfterFirstWrite_CompressesAndFlushes() in /_/src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs:line 1167

Logs


Build

https://dev.azure.com/dnceng-public/public/_build/results?buildId=916632&view=results

Other tests such as Failed Microsoft.AspNetCore.ResponseCompression.Tests.ResponseCompressionMiddlewareTest.SendFileAsync_FirstWrite_CompressesAndFlushes fail in a similar way:

2025-01-14T10:02:13.9643316Z Expected: 34
2025-01-14T10:02:13.9643333Z Actual: 31

Likely related to the recent update from Fedore38 to Fedora41

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware label Jan 14, 2025
@wtgodbe
Copy link
Member Author

wtgodbe commented Jan 14, 2025

CC @adityamandaleeka new 8.0 test failures on Fedora41

@BrennanConroy
Copy link
Member

Compression (at least zlib probably other algorithms too) don't have a guaranteed size between algorithm versions. We either do the simple "fix" of changing the expected size, or we try to be a little looser in our checks by checking a range potentially.

e.g.
Assert.InRange(compressedSize, 20, 40);

@wtgodbe
Copy link
Member Author

wtgodbe commented Jan 14, 2025

Did we already make that change in main? I don't see the same failures there

@BrennanConroy
Copy link
Member

I remember we did the lazy fix during a runtime update when the runtime changed the zlib library. It might not be affected by the OS change in the same way.

@wtgodbe
Copy link
Member Author

wtgodbe commented Jan 14, 2025

Looks like that was #56684 - that doesn't touch SendFileAsync_AfterFirstWrite_CompressesAndFlushes though, so it's not obvious to me why we're not seeing failure on main

@BrennanConroy
Copy link
Member

runtime changed the zlib library. It might not be affected by the OS change in the same way.

@wtgodbe
Copy link
Member Author

wtgodbe commented Jan 14, 2025

Should we just update the 8.0 tests to use a range then? Are you the right person to make the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware test-failure
Projects
None yet
Development

No branches or pull requests

2 participants