这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9593c19
improve Peaky tests and environment configuration
jonsequitur Mar 29, 2024
7d104b4
prebuild console package at app startup
jonsequitur Mar 29, 2024
1767d21
turn off HTTPS redirection
jonsequitur Apr 1, 2024
258f070
remove empty cell
jonsequitur Apr 1, 2024
77f9b62
TrySetException
jonsequitur Apr 2, 2024
632ca06
cleanup
jonsequitur Apr 2, 2024
3f3d406
improve integration test error output
jonsequitur Apr 2, 2024
88d6c86
remove integration test artifact output from Linux build
jonsequitur Apr 2, 2024
99ad00d
add PocketLogger to integration tests
jonsequitur Apr 4, 2024
26c7563
make Linux integration tests go away
jonsequitur Apr 4, 2024
4685a13
publish all artifacts
jonsequitur Apr 4, 2024
8533583
logging improvements
jonsequitur Apr 4, 2024
d684da8
PocketLogger and logging updates
jonsequitur Apr 5, 2024
dfd5e17
fix warning
jonsequitur Apr 5, 2024
01126e1
remove separate screenshot publishing step
jonsequitur Apr 6, 2024
42999eb
disable PDB converter
jonsequitur Apr 8, 2024
f9ba993
don't publish to symbol server
jonsequitur Apr 8, 2024
4394c60
update log path
jonsequitur Apr 8, 2024
0e98905
<PublishWindowsPdb>false</PublishWindowsPdb>
jonsequitur Apr 9, 2024
66a7964
turn on logging regardless of environment variable
jonsequitur Apr 9, 2024
eef2fca
update Microsoft.DotNet.Interactive.CSharpProject version
jonsequitur Apr 9, 2024
ede9e66
update package versions
jonsequitur Apr 9, 2024
e88becc
update Microsoft.DotNet.Interactive.CSharpProject version
jonsequitur Apr 10, 2024
eade209
set POCKETLOGGER_LOG_PATH globally
jonsequitur Apr 10, 2024
bcb4619
reorganize test fixtures, improve logging
jonsequitur Apr 11, 2024
6c8005d
move prebuilds into artifacts folder
jonsequitur Apr 11, 2024
f21ddb3
update to latest Microsoft.DotNet.Interactive.CSharpProject
jonsequitur Apr 12, 2024
af09d41
update pipeline
jonsequitur Apr 12, 2024
b2efd0e
more .yml updates and .NET SDK version update
jonsequitur Apr 12, 2024
0d1748f
small rename
jonsequitur Apr 15, 2024
da9d193
disable test parallelism
jonsequitur Apr 15, 2024
28a8dab
package updates
jonsequitur Apr 15, 2024
e2be2ee
build debug
jonsequitur Apr 16, 2024
3246c4f
update CSharpProject package version
jonsequitur Apr 17, 2024
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
5 changes: 0 additions & 5 deletions Developer-guide.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,6 @@
"\n",
"The core of Try .NET is powered by the `CSharpProjectKernel`, which serves as the backend for .NET Interactive."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
}
],
"metadata": {
Expand Down
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<!-- private repo, don't do source-link -->
<DeterministicSourcePaths>false</DeterministicSourcePaths>
<EnableSourceLink>false</EnableSourceLink>

<PublishWindowsPdb>false</PublishWindowsPdb>

<!-- NuGet: A stable release of a package should not have a prerelease dependency. -->
<NoWarn>$(NoWarn);NU5104</NoWarn>
</PropertyGroup>
Expand Down
23 changes: 13 additions & 10 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>

<ItemGroup>
<PackageVersion Include="Assent" Version="2.3.2" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
Expand All @@ -12,24 +11,28 @@
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.3" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.3" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.3" />
<PackageVersion Include="Microsoft.DotNet.Interactive.CSharpProject" Version="1.0.0-beta.24168.2" />
<PackageVersion Include="Microsoft.Playwright" Version="1.41.2" />
<PackageVersion Include="peaky.client" Version="4.0.73" />
<PackageVersion Include="peaky.xunit" Version="4.0.73" />
<PackageVersion Include="Peaky" Version="4.0.77-beta" />
<PackageVersion Include="PocketLogger" Version="0.8.2" />
<PackageVersion Include="Microsoft.DotNet.Interactive.CSharpProject" Version="1.0.0-beta.24217.2" />
<PackageVersion Include="Microsoft.Playwright" Version="1.42.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="peaky.client" Version="4.0.79" />
<PackageVersion Include="peaky.xunit" Version="4.0.79" />
<PackageVersion Include="Peaky" Version="4.0.79-beta" />
<PackageVersion Include="Pocket.Disposable" Version="1.2.0" />
<PackageVersion Include="PocketLogger.For.Xunit" Version="0.9.0" />
<PackageVersion Include="PocketLogger.Subscribe" Version="0.9.0" />
<PackageVersion Include="PocketLogger" Version="0.9.0" />
<PackageVersion Include="Serilog.Sinks.RollingFileAlternate" Version="2.0.9" />
<PackageVersion Include="Serilog" Version="2.10.0" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageVersion Include="System.Drawing.Common" Version="8.0.3" />
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
<PackageVersion Include="System.Reactive" Version="6.0.0" />
<PackageVersion Include="System.Security.Cryptography.X509Certificates" Version="4.3.2" />
<PackageVersion Include="xunit" Version="2.7.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7" />
<PackageVersion Include="xunit" Version="2.7.0" />
</ItemGroup>

<ItemGroup Condition="'$(DisableArcade)' == '1'">
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
</ItemGroup>

</Project>
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ COPY --from=build-env /App/out .

# Set up to run and expose app on port 80
EXPOSE 80
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS=http://*:80/

# This is a workaround for the fact that the Try .NET website is not yet container-aware
Expand Down
2 changes: 1 addition & 1 deletion PeakyTests.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"outputs": [],
"source": [
"var tests = await peakyClient.GetTestsAsync();\n",
"tests"
"tests.Display();"
]
},
{
Expand Down
52 changes: 21 additions & 31 deletions azure-pipelines-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,9 @@ variables:
- name: _DotNetArtifactsCategory
value: .NETCore
- name: DotNetSdkVersion
value: '8.0.101'
value: '8.0.204'
- name: NodeJSVersion
value: '16.13.0'
- name: TryDotNetPackagesPath
value: $(Build.SourcesDirectory)/artifacts/.trydotnet/packages
- name: RunIntegrationTests
value: true
- name: Codeql.Enabled
value: true

Expand Down Expand Up @@ -86,23 +82,18 @@ extends:
outputParentDirectory: $(Build.SourcesDirectory)/artifacts
outputs:
- output: pipelineArtifact
targetPath: $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)
artifactName: Windows_test_results_and_dumps
displayName: Publish Test results and Blame dumps
condition: failed()
- output: pipelineArtifact
targetPath: $(Build.SourcesDirectory)/artifacts/bin/Microsoft.TryDotNet.IntegrationTests/$(_BuildConfig)/net8.0/playwright_screenshots
artifactName: Windows_playwright_screenshots
displayName: Publish Playwright screen shots
targetPath: $(Build.SourcesDirectory)/artifacts
artifactName: Windows_artifacts
displayName: Publish Windows artifacts
condition: always()
continueOnError: true
# Packages are not being generated
# - output: pipelineArtifact
# targetPath: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)
# artifactName: packages
# displayName: Publish packages to artifacts container

variables:
- name: TRYDOTNET_PREBUILDS_PATH
value: $(Build.SourcesDirectory)\artifacts\trydotnet-prebuilds
- name: POCKETLOGGER_LOG_PATH
value: $(Build.SourcesDirectory)\artifacts\logs\pocketlogger.log
- name: RunIntegrationTests
value: true
# Enable signing for internal, non-PR builds
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: DotNet-Blob-Feed
Expand All @@ -125,7 +116,6 @@ extends:
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
/p:PublishToSymbolServer=true
# else
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- name: _SignType
Expand Down Expand Up @@ -171,7 +161,8 @@ extends:
$(_TestArgs)
displayName: Build
env:
TRYDOTNET_PACKAGES_PATH: $(TryDotNetPackagesPath)
POCKETLOGGER_LOG_PATH: $(PocketLoggerLogPath)
TRYDOTNET_PREBUILDS_PATH: $(TryDotNetPrebuildsPath)

- script: dotnet test -l trx --no-build --blame-hang-timeout 15m --blame-hang-dump-type full -c $(_BuildConfig) --results-directory $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)
displayName: Test / Blame
Expand Down Expand Up @@ -204,17 +195,15 @@ extends:
outputParentDirectory: $(Build.SourcesDirectory)/artifacts
outputs:
- output: pipelineArtifact
targetPath: $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)
artifactName: Linux_test_results_and_dumps
displayName: Publish Test results and Blame dumps
condition: failed()
- output: pipelineArtifact
targetPath: $(Build.SourcesDirectory)/artifacts/bin/Microsoft.TryDotNet.IntegrationTests/$(_BuildConfig)/net8.0/playwright_screenshots
artifactName: Linux_playwright_screenshots
displayName: Publish Playwright screen shots
targetPath: $(Build.SourcesDirectory)/artifacts
artifactName: Linux_artifacts
displayName: Publish Linux artifacts
condition: always()
continueOnError: true
variables:
- name: TRYDOTNET_PREBUILDS_PATH
value: $(Build.SourcesDirectory)/artifacts/trydotnet-prebuilds
- name: POCKETLOGGER_LOG_PATH
value: $(Build.SourcesDirectory)/artifacts/logs/pocketlogger.log
# Enable signing for internal, non-PR builds
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- name: _SignType
Expand Down Expand Up @@ -266,7 +255,8 @@ extends:
$(_TestArgs)
displayName: Build
env:
TRYDOTNET_PACKAGES_PATH: $(TryDotNetPackagesPath)
POCKETLOGGER_LOG_PATH: $(PocketLoggerLogPath)
TRYDOTNET_PREBUILDS_PATH: $(TryDotNetPrebuildsPath)

- script: dotnet test -l trx --no-build --blame-hang-timeout 15m --blame-hang-dump-type full -c $(_BuildConfig) --results-directory $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)
displayName: Test / Blame
Expand Down
69 changes: 26 additions & 43 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,19 @@ variables:
- name: _TeamName
value: DotNetTry
- name: _BuildConfig
value: Release
value: Debug
- name: _PublishUsingPipelines
value: true
- name: _DotNetArtifactsCategory
value: .NETCore
- name: DotNetSdkVersion
value: '8.0.101'
value: '8.0.204'
- name: NodeJSVersion
value: '16.13.0'
- name: TryDotNetPackagesPath
value: $(Build.SourcesDirectory)/artifacts/.trydotnet/packages
- name: RunIntegrationTests
value: true
- name: Codeql.Enabled
value: true
- name: system.debug
value: true

stages:
- stage: build
Expand All @@ -55,6 +53,12 @@ stages:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals windows.vs2022.amd64
variables:
- name: RunIntegrationTests
value: true
- name: TRYDOTNET_PREBUILDS_PATH
value: $(Build.SourcesDirectory)\artifacts\trydotnet-prebuilds
- name: POCKETLOGGER_LOG_PATH
value: $(Build.SourcesDirectory)\artifacts\logs\pocketlogger.log
# Enable signing for internal, non-PR builds
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: DotNet-Blob-Feed
Expand All @@ -77,7 +81,6 @@ stages:
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
/p:PublishToSymbolServer=true
# else
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- name: _SignType
Expand Down Expand Up @@ -123,9 +126,10 @@ stages:
$(_TestArgs)
displayName: Build
env:
TRYDOTNET_PACKAGES_PATH: $(TryDotNetPackagesPath)
POCKETLOGGER_LOG_PATH: $(PocketLoggerLogPath)
TRYDOTNET_PREBUILDS_PATH: $(TryDotNetPrebuildsPath)

- script: dotnet test -l trx --no-build --blame-hang-timeout 15m --blame-hang-dump-type full -c $(_BuildConfig) --results-directory $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)
- script: dotnet test -l trx --no-build --blame-hang-timeout 15m --blame-hang-dump-type full -c $(_BuildConfig) --results-directory $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig) --diag $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/diag.txt -p:m=1
displayName: Test / Blame
workingDirectory: $(Build.SourcesDirectory)
condition: ne(variables['SkipTests'], 'true')
Expand All @@ -138,29 +142,12 @@ stages:
condition: and(ne(variables['KeepDumps'], 'true'), ne(variables['SkipTests'], 'true'))

- task: PublishBuildArtifacts@1
displayName: Publish Test results and Blame dumps
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)
artifactName: Windows_test_results_and_dumps
artifactType: container
condition: failed()

- task: PublishBuildArtifacts@1
displayName: Publish Playwright screen shots
displayName: Publish Windows artifacts
inputs:
pathToPublish: $(Build.SourcesDirectory)\artifacts\bin\Microsoft.TryDotNet.IntegrationTests\Release\net8.0\playwright_screenshots
artifactName: Windows_playwright_screenshots
pathToPublish: $(Build.SourcesDirectory)/artifacts/
artifactName: Windows_artifacts
artifactType: container
condition: always()
continueOnError: true

# Packages are not being generated
# - task: PublishBuildArtifacts@1
# displayName: Publish packages to artifacts container
# inputs:
# pathToPublish: $(Build.SourcesDirectory)\artifacts\packages\$(_BuildConfig)
# artifactName: packages
# artifactType: container

- template: /eng/common/templates/jobs/jobs.yml
parameters:
Expand All @@ -174,6 +161,10 @@ stages:
pool:
vmImage: ubuntu-20.04
variables:
- name: TRYDOTNET_PREBUILDS_PATH
value: $(Build.SourcesDirectory)/artifacts/trydotnet-prebuilds
- name: POCKETLOGGER_LOG_PATH
value: $(Build.SourcesDirectory)/artifacts/logs/pocketlogger.log
# Enable signing for internal, non-PR builds
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- name: _SignType
Expand Down Expand Up @@ -225,9 +216,10 @@ stages:
$(_TestArgs)
displayName: Build
env:
TRYDOTNET_PACKAGES_PATH: $(TryDotNetPackagesPath)
POCKETLOGGER_LOG_PATH: $(PocketLoggerLogPath)
TRYDOTNET_PREBUILDS_PATH: $(TryDotNetPrebuildsPath)

- script: dotnet test -l trx --no-build --blame-hang-timeout 15m --blame-hang-dump-type full -c $(_BuildConfig) --results-directory $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)
- script: dotnet test -l trx --no-build --blame-hang-timeout 15m --blame-hang-dump-type full -c $(_BuildConfig) --results-directory $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig) --diag $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/diag.txt
displayName: Test / Blame
workingDirectory: $(Build.SourcesDirectory)
condition: ne(variables['SkipTests'], 'true')
Expand All @@ -240,21 +232,12 @@ stages:
condition: and(ne(variables['KeepDumps'], 'true'), ne(variables['SkipTests'], 'true'))

- task: PublishBuildArtifacts@1
displayName: Publish Test results and Blame dumps
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)
artifactName: Linux_test_results_and_dumps
artifactType: container
condition: failed()

- task: PublishBuildArtifacts@1
displayName: Publish Playwright screen shots
displayName: Publish Linux artifacts
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/bin/Microsoft.TryDotNet.IntegrationTests/Release/net8.0/playwright_screenshots
artifactName: Linux_playwright_screenshots
pathToPublish: $(Build.SourcesDirectory)/artifacts/
artifactName: Linux_artifacts
artifactType: container
condition: always()
continueOnError: true

#---------------------------------------------------------------------------------------------------------------------#
# Post Build #
Expand Down
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<UsingToolNuGetRepack>true</UsingToolNuGetRepack>
<UsingToolXUnit>false</UsingToolXUnit>
<UsingToolSymbolUploader>true</UsingToolSymbolUploader>
<UsingToolPdbConverter>false</UsingToolPdbConverter>
<TestRunnerAdditionalArguments>-parallel none</TestRunnerAdditionalArguments>
</PropertyGroup>
<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"sdk": {
"version": "8.0.202",
"version": "8.0.204",
"allowPrerelease": true,
"rollForward": "latestMinor"
},
"tools": {
"dotnet": "8.0.202",
"dotnet": "8.0.204",
"rollForward": "latestMinor"
},
"msbuild-sdks": {
Expand Down
29 changes: 29 additions & 0 deletions src/Microsoft.TryDotNet.IntegrationTests/(Pocket)/Logger/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Reflection;
using Microsoft.DotNet.Interactive;
using Microsoft.DotNet.Interactive.CSharpProject;
using Microsoft.DotNet.Interactive.Documents;
using Microsoft.TryDotNet.IntegrationTests;
using Xunit.Abstractions;

namespace Pocket;

internal partial class LogEvents
{
public static IDisposable SubscribeToPocketLogger(this ITestOutputHelper output) =>
Subscribe(
e => output.WriteLine(e.ToLogString()),
AssembliesPublishingPocketLoggerEvents);

public static Assembly[] AssembliesPublishingPocketLoggerEvents =>
[
typeof(Microsoft.TryDotNet.Program).Assembly, // Microsoft.TryDotNet.dll
typeof(Kernel).Assembly, // Microsoft.DotNet.Interactive.dll
typeof(CSharpProjectKernel).Assembly, // Microsoft.DotNet.Interactive.CSharpProject.dll
typeof(InteractiveDocument).Assembly, // Microsoft.DotNet.Interactive.Documents.dll,
typeof(IntegratedServicesFixture).Assembly // Microsoft.TryDotNet.IntegrationTests.dll
];
}
Loading