Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 92 additions & 92 deletions eng/Version.Details.props

Large diffs are not rendered by default.

370 changes: 185 additions & 185 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions eng/common/core-templates/job/publish-build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
/p:MaestroApiEndpoint=https://maestro.dot.net
/p:OfficialBuildId=$(OfficialBuildId)
-runtimeSourceFeed https://ci.dot.net/internal
-runtimeSourceFeedKey $(dotnetbuilds-internal-container-read-token-base64)
-runtimeSourceFeedKey '$(dotnetbuilds-internal-container-read-token-base64)'

condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
Expand Down Expand Up @@ -210,8 +210,8 @@ jobs:
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'
-SkipAssetsPublishing '${{ parameters.isAssetlessBuild }}'
-runtimeSourceFeed https://ci.dot.net/internal
-runtimeSourceFeedKey $(dotnetbuilds-internal-container-read-token-base64)
-runtimeSourceFeed https://ci.dot.net/internal
-runtimeSourceFeedKey '$(dotnetbuilds-internal-container-read-token-base64)'

- ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
- template: /eng/common/core-templates/steps/publish-logs.yml
Expand Down
2 changes: 1 addition & 1 deletion eng/common/core-templates/post-build/post-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,4 +334,4 @@ stages:
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'
-SkipAssetsPublishing '${{ parameters.isAssetlessBuild }}'
-runtimeSourceFeed https://ci.dot.net/internal
-runtimeSourceFeedKey $(dotnetbuilds-internal-container-read-token-base64)
-runtimeSourceFeedKey '$(dotnetbuilds-internal-container-read-token-base64)'
4 changes: 2 additions & 2 deletions eng/common/core-templates/steps/publish-logs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ steps:
# If the file exists - sensitive data for redaction will be sourced from it
# (single entry per line, lines starting with '# ' are considered comments and skipped)
arguments: -InputPath '$(System.DefaultWorkingDirectory)/PostBuildLogs'
-BinlogToolVersion ${{parameters.BinlogToolVersion}}
-BinlogToolVersion '${{parameters.BinlogToolVersion}}'
-TokensFilePath '$(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt'
-runtimeSourceFeed https://ci.dot.net/internal
-runtimeSourceFeedKey $(dotnetbuilds-internal-container-read-token-base64)
-runtimeSourceFeedKey '$(dotnetbuilds-internal-container-read-token-base64)'
'$(publishing-dnceng-devdiv-code-r-build-re)'
'$(MaestroAccessToken)'
'$(dn-bot-all-orgs-artifact-feeds-rw)'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ steps:
workingDirectory: $(Agent.TempDirectory)

- script: |
$(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version ${{parameters.sourceIndexProcessBinlogPackageVersion}} --add-source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools
$(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version ${{parameters.sourceIndexUploadPackageVersion}} --add-source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools
$(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version ${{parameters.sourceIndexProcessBinlogPackageVersion}} --source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools
$(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version ${{parameters.sourceIndexUploadPackageVersion}} --source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools
displayName: "Source Index: Download netsourceindex Tools"
# Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk.
workingDirectory: $(Agent.TempDirectory)
Expand Down
2 changes: 1 addition & 1 deletion eng/common/native/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ case "$os" in
libssl-dev libkrb5-dev pigz cpio

localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
elif [ "$ID" = "fedora" ] || [ "$ID" = "rhel" ] || [ "$ID" = "azurelinux" ]; then
elif [ "$ID" = "fedora" ] || [ "$ID" = "rhel" ] || [ "$ID" = "azurelinux" ] || [ "$ID" = "centos"]; then
pkg_mgr="$(command -v tdnf 2>/dev/null || command -v dnf)"
$pkg_mgr install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio
elif [ "$ID" = "amzn" ]; then
Expand Down
6 changes: 3 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"jdk": "latest"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.25556.111",
"Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.25556.111",
"Microsoft.DotNet.SharedFramework.Sdk": "11.0.0-beta.25556.111",
"Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.25562.109",
"Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.25562.109",
"Microsoft.DotNet.SharedFramework.Sdk": "11.0.0-beta.25562.109",
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.Build.Traversal": "3.4.0",
"Microsoft.WixToolset.Sdk": "5.0.2-dotnet.2811440"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ public Http3ControlStream(Http3StreamContext context, long? headerType)
context.ClientPeerSettings,
this);
_frameWriter.Reset(context.Transport.Output, context.ConnectionId);

_streamClosedFeature.OnClosed(static state =>
{
var stream = (Http3ControlStream)state!;
stream.OnStreamClosed();
}, this);
}

private void OnStreamClosed()
Expand Down Expand Up @@ -135,12 +141,6 @@ private bool TryClose()

internal async ValueTask ProcessOutboundSendsAsync(long id)
{
_streamClosedFeature.OnClosed(static state =>
{
var stream = (Http3ControlStream)state!;
stream.OnStreamClosed();
}, this);

await _frameWriter.WriteStreamIdAsync(id);
await _frameWriter.WriteSettingsAsync(_serverPeerSettings.GetNonProtocolDefaults());
}
Expand Down Expand Up @@ -311,18 +311,13 @@ private async Task HandleControlStream()
}
}

private async ValueTask HandleEncodingDecodingTask()
private Task HandleEncodingDecodingTask()
{
// Noop encoding and decoding task. Settings make it so we don't need to read content of encoder and decoder.
// An endpoint MUST allow its peer to create an encoder stream and a
// decoder stream even if the connection's settings prevent their use.

while (_isClosed == 0)
{
var result = await Input.ReadAsync();
var readableBuffer = result.Buffer;
Input.AdvanceTo(readableBuffer.End);
}
return Input.CopyToAsync(Stream.Null);
}

private ValueTask ProcessHttp3ControlStream(Http3RawFrame incomingFrame, bool isContinuedFrame, in ReadOnlySequence<byte> payload, out SequencePosition consumed)
Expand Down Expand Up @@ -372,11 +367,6 @@ private ValueTask ProcessSettingsFrameAsync(bool isContinuedFrame, ReadOnlySeque
}

_haveReceivedSettingsFrame = true;
_streamClosedFeature.OnClosed(static state =>
{
var stream = (Http3ControlStream)state!;
stream.OnStreamClosed();
}, this);
}

while (true)
Expand Down
22 changes: 20 additions & 2 deletions src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,26 @@ public void OnInboundControlStreamSetting(Http3SettingType type, long value)

public bool OnInboundDecoderStream(Server.Kestrel.Core.Internal.Http3.Http3ControlStream stream)
{
return _inner.OnInboundDecoderStream(stream);
var res = _inner.OnInboundDecoderStream(stream);

if (_http3TestBase._runningStreams.TryGetValue(stream.StreamId, out var testStream))
{
testStream.OnDecoderStreamCreatedTcs.TrySetResult();
}

return res;
}

public bool OnInboundEncoderStream(Server.Kestrel.Core.Internal.Http3.Http3ControlStream stream)
{
return _inner.OnInboundEncoderStream(stream);
var res = _inner.OnInboundEncoderStream(stream);

if (_http3TestBase._runningStreams.TryGetValue(stream.StreamId, out var testStream))
{
testStream.OnEncoderStreamCreatedTcs.TrySetResult();
}

return res;
}

public void OnStreamCompleted(IHttp3Stream stream)
Expand Down Expand Up @@ -479,6 +493,8 @@ internal class Http3StreamBase
internal TaskCompletionSource OnStreamCreatedTcs { get; } = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
internal TaskCompletionSource OnStreamCompletedTcs { get; } = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
internal TaskCompletionSource OnHeaderReceivedTcs { get; } = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
internal TaskCompletionSource OnDecoderStreamCreatedTcs { get; } = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
internal TaskCompletionSource OnEncoderStreamCreatedTcs { get; } = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);

internal TestStreamContext StreamContext { get; }
internal DuplexPipe.DuplexPipePair Pair { get; }
Expand All @@ -495,6 +511,8 @@ public long Error
public Task OnStreamCreatedTask => OnStreamCreatedTcs.Task;
public Task OnStreamCompletedTask => OnStreamCompletedTcs.Task;
public Task OnHeaderReceivedTask => OnHeaderReceivedTcs.Task;
public Task OnDecoderStreamCreatedTask => OnDecoderStreamCreatedTcs.Task;
public Task OnEncoderStreamCreatedTask => OnEncoderStreamCreatedTcs.Task;

public ConnectionAbortedException AbortReadException => StreamContext.AbortReadException;
public ConnectionAbortedException AbortWriteException => StreamContext.AbortWriteException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,59 @@ public async Task ErrorCodeIsValidOnConnectionTimeout()
Assert.InRange(errorCodeFeature.Error, 0, (1L << 62) - 1); // Valid range for HTTP/3 error codes
}

[Theory]
[InlineData(2)] // encoder
[InlineData(3)] // decoder
public async Task IgnoredControlStreams_CloseConnectionOnEndStream(int streamType)
{
await Http3Api.InitializeConnectionAsync(_noopApplication);

var stream = await Http3Api.CreateControlStream(streamType);

// PipeWriter will be completed when end of stream is received. Should exit read loop and close stream
// which will cause the connection to close with an error.
await stream.SendFrameAsync(Http3FrameType.Data, Memory<byte>.Empty, endStream: true);

await stream.OnStreamCompletedTask.DefaultTimeout();

Http3Api.TriggerTick();
Http3Api.TriggerTick(TimeSpan.FromSeconds(1));

await Http3Api.WaitForConnectionErrorAsync<Http3ConnectionErrorException>(
ignoreNonGoAwayFrames: true,
expectedLastStreamId: 0,
expectedErrorCode: Http3ErrorCode.ClosedCriticalStream,
matchExpectedErrorMessage: AssertExpectedErrorMessages,
expectedErrorMessage: CoreStrings.Http3ErrorControlStreamClosed);
MetricsAssert.Equal(ConnectionEndReason.ClosedCriticalStream, Http3Api.ConnectionTags);
}

[Theory]
[InlineData(2)] // encoder
[InlineData(3)] // decoder
public async Task IgnoredControlStreams_CloseConnectionOnStreamClose(int streamType)
{
await Http3Api.InitializeConnectionAsync(_noopApplication);

var stream = await Http3Api.CreateControlStream(streamType);

await (streamType == 2 ? stream.OnEncoderStreamCreatedTask : stream.OnDecoderStreamCreatedTask).DefaultTimeout();

// Simulate quic layer closing the stream
stream.StreamContext.Close();

Http3Api.TriggerTick();
Http3Api.TriggerTick(TimeSpan.FromSeconds(1));

await Http3Api.WaitForConnectionErrorAsync<Http3ConnectionErrorException>(
ignoreNonGoAwayFrames: true,
expectedLastStreamId: 0,
expectedErrorCode: Http3ErrorCode.ClosedCriticalStream,
matchExpectedErrorMessage: AssertExpectedErrorMessages,
expectedErrorMessage: CoreStrings.Http3ErrorControlStreamClosed);
MetricsAssert.Equal(ConnectionEndReason.ClosedCriticalStream, Http3Api.ConnectionTags);
}

private sealed class ThrowingMultiplexedConnectionContext : TestMultiplexedConnectionContext
{
private int _skipCount;
Expand Down
Loading