-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Change Linux fetch timeout behavior for chain building #40676
Conversation
Change the UrlRetrievalTimeout behavior on Linux to match Windows' existing behavior of using a per-operation timeout rather than cumulative. Add some tests for operations that time out.
@@ -30,6 +30,9 @@ internal sealed class RevocationResponder : IDisposable | |||
|
|||
public bool RespondEmpty { get; set; } | |||
|
|||
public TimeSpan RespondDelay { get; set; } |
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.
public TimeSpan RespondDelay { get; set; } | |
public TimeSpan ResponseDelay { get; set; } |
Reads a bit better to me, particularly in the formatted strings.
...System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/ChainPal.cs
Show resolved
Hide resolved
...ibraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/TimeoutTests.cs
Show resolved
Hide resolved
responder.RespondDelay = delay; | ||
responder.DelayedActions = RevocationResponder.DelayedActionsFlag.All; | ||
|
||
|
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.
NIt: too many blank lines
...ibraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/TimeoutTests.cs
Show resolved
Hide resolved
@vcsjones This portion of the change seems reasonable to me... are you expecting anything else to come in to it soon, or should we just check outerloop and merge this, with followups done in a different PR? (Just getting sensitive about timing) |
@bartonjs I think outerloop is going to fail; I'm looking at fixing a Windows test today. Should be in by COB. |
...ibraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/TimeoutTests.cs
Show resolved
Hide resolved
@bartonjs this is ready for review and and outerloop run, assuming there is nothing else that needs to be addressed immediately. |
Random thought: we could do it both ways if we wanted to. Windows lets you have a cumulative timeout with CERT_CHAIN_REVOCATION_ACCUMULATIVE_TIMEOUT. Would there be interest in an API that lets folks get the old behavior back on Linux, and use this in Windows? (Post 5, of course) |
I'm open to the idea, especially if it seems like anyone actually wants it. Clearly it's how I thought the Windows one worked, but early in .NET Core we didn't have the capability of writing the tests reliably (Since it wasn't until after CertificateRequest/AsnReader/AsnWriter/CustomRootTrust that we could do it in a reasonable/self-contained way).
So it's unclear how relevant such an option would be to anyone, but I'm happy to entertain things if we feel it's relevant. (Maybe all 0.6%/12.5%/15.8% want the feature, maybe it's none.) |
I have no idea. I'm easily excited by things 7 people on the planet want. Innerloop failure seems unrelated, I can address any additional feedback Thursday AM. |
/azp run runtime-libraries outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
Hmm. Looking at failure. |
In case you hadn't had these observations already:
Conclusion: Win8.1 had a bigger max value than Win10. Solution1: Figure out the Win8.1 limit, and if it's acceptable, change the test to use that on Win8.1. |
I went with solution 2 in the interest of time, and I at risk of losing power / internet due to weather, so wanted to get something in. |
/azp run runtime-libraries outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
None of the failures appear related to this PR. |
This gets the ball rolling on what I guess is going to require some discussion to unify UrlRetreivalTimeout on Windows / Linux.
Change the UrlRetrievalTimeout behavior on Linux to match Windows' existing behavior of using a per-operation timeout rather than cumulative.
Add some tests for operations that time out.
Contributes to #38875
Closes #40578