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

Johluo/migrate more extensions logging #20421

Merged
merged 63 commits into from
Apr 3, 2020

Conversation

JunTaoLuo
Copy link
Contributor

Moving a few more things from extensions to aspnetcore to help remove dependencies on that repo. #19254

FYI only the last commit is interesting

Nate McMaster and others added 30 commits November 6, 2018 14:13
…maestro-bot/Common into merge/release/2.1-to-release/2.2
Addresses #571
Using `TaskCreationOptions.LongRunning` creates a dedicated thread, but
it's released on the first await. Using Task.Run uses the thread pool
instead
* Add attribute for collecting dumps for failed LoggedTest
.NET Core 2.0 reached EOL last year. This removes multi-targeting our test projects and test assets to only use .NET Core 2.1 and .NET Framework 4.6.1.
Use arcade
* Remove obsolete targets, properties, and scripts
* Replace IsProductComponent with IsShipping
* Undo bad merge to version.props
* Update documentation, and put workarounds into a common file
* Replace usages of RepositoryRoot with RepoRoot
* Remove API baselines
* Remove unnecessary restore feeds and split workarounds into two files
* Enable PR checks on all branches, and disable autocancel
* Deprecate and replace IHostingEnvronment & IApplicationLifetime #966
* Fix startvs
* Fix ref generation for obosolete
* Manualy update tooling dependencies to normalize names

* Nullable
* Use Arcade's convention for setting IsPackable (must be explicitly set)
* Use Arcade conventions for using DebugType and eng/Versions.props
* Remove dead code
* Update restore feeds in daily builds.md
* Disable UsingToolNetFrameworkReferenceAssemblies in analyzer tests
* Remove usage of TestGroupName (an obsolete KoreBuild setting)
* Use IVT as a .csproj attribute
@JunTaoLuo JunTaoLuo requested a review from dougbu as a code owner April 1, 2020 19:14
@JunTaoLuo JunTaoLuo added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Apr 1, 2020
Copy link
Member

@dougbu dougbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What, if any C# code is new?

eng/Build.props Outdated Show resolved Hide resolved
{
var beforeCount = collection.Count;
collection.TryAddEnumerable(descriptor);
return beforeCount != collection.Count;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since other threads can change the Count of this shared collection, suggest instead doing something like what TryAddEnumerable(...) does:

var implementationType = descriptor.GetImplementationType();
if (!services.Any(d =>
    d.ServiceType == descriptor.ServiceType &&
    d.GetImplementationType() == implementationType))
{
    collection.TryAddEnumerable(descriptor);
    return true;
}

return false;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you file a bug for this? I'm concerned with migrating files here, I'm not going to fix bugs as part of this PR.

@JunTaoLuo
Copy link
Contributor Author

No new C#, the only change I made was in 4294861

@JunTaoLuo JunTaoLuo force-pushed the johluo/migrate-more-extensions-logging branch from df307b4 to f4a4346 Compare April 2, 2020 18:58
@JunTaoLuo
Copy link
Contributor Author

Hmm agent down: We stopped hearing from agent Azure Pipelines 166.

@JunTaoLuo
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@JunTaoLuo JunTaoLuo requested a review from a team April 2, 2020 22:22
@JunTaoLuo
Copy link
Contributor Author

@dotnet/aspnet-build This is ready to go in FYI.

{
var beforeCount = collection.Count;
collection.TryAddEnumerable(descriptor);
return beforeCount != collection.Count;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to self: File bug about reliability of this code.

<PropertyGroup>
<Description>Logger implementation to support Azure App Services 'Diagnostics logs' and 'Log stream' features.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<NoWarn>$(NoWarn);CS1591</NoWarn>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have <WarningsNotAsErrors>$(WarningsNotAsErrors);CS1591</WarningsNotAsErrors> in the root Directory.Build.props. We also have <NoWarn>$(NoWarn);CS1591</NoWarn> in >70 projects. Is this a declaration that we'll never get around to adding XML docs?

@anurse because it looks like you own a lot of those 70+ projects.

@@ -89,7 +89,7 @@ private async Task ClientCertTest(TestVariant variant, bool sendClientCert)
}
catch (Exception ex)
{
Logger.LogError($"Certificate is invalid. Issuer name: {cert.Issuer}");
Logger.LogError($"Certificate is invalid. Issuer name: {cert?.Issuer}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand @jkotalik asked you to do this. But, what does the change have to do w/ the migration?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

He suggested it to debug a failing test, probably it was just flaky. @jkotalik care to quarantine those tests?

@JunTaoLuo JunTaoLuo merged commit 8fac707 into master Apr 3, 2020
@JunTaoLuo JunTaoLuo deleted the johluo/migrate-more-extensions-logging branch April 3, 2020 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet