Skip to content

Commit

Permalink
FO 3.1.16 (Removed unused deps).
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Torre committed Jul 27, 2021
1 parent f54cac7 commit f639afb
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.7" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.17.0" />
<PackageReference Include="Microsoft.ApplicationInsights.PerfCounterCollector" Version="2.17.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" Version="2.17.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WindowsServer" Version="2.17.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.17.0" />
<PackageReference Include="Microsoft.ApplicationInsights.NLogTarget" Version="2.17.0" />
<PackageReference Include="Microsoft.ServiceFabric" Version="7.2.452" />
<PackageReference Include="Microsoft.ServiceFabric.Data" Version="4.2.452" />
<PackageReference Include="Microsoft.ServiceFabric.Data.Extensions" Version="4.2.452" />
Expand Down
14 changes: 3 additions & 11 deletions FabricObserver/FabricObserver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<!-- For multi-target publish (say, from Azure Pipeline build or for when you build FO using supplied scripts), you can use multi-target RIDs:
linux-x64;win-x64. -->
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
<FileVersion>3.1.15.0</FileVersion>
<FileVersion>3.1.16.0</FileVersion>
<Copyright>Copyright © 2020</Copyright>
<Product>FabricObserver</Product>
<ProductName>Service Fabric Observer</ProductName>
<ProductVersion>3.1.15</ProductVersion>
<ProductVersion>3.1.16</ProductVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<IsServiceFabricServiceProject>true</IsServiceFabricServiceProject>
<StartupObject>FabricObserver.Program</StartupObject>
Expand All @@ -28,26 +28,18 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.9.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.17.0" />
<PackageReference Include="Microsoft.ApplicationInsights.PerfCounterCollector" Version="2.17.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" Version="2.17.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WindowsServer" Version="2.17.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.17.0" />
<PackageReference Include="Microsoft.ApplicationInsights.NLogTarget" Version="2.17.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.ServiceFabric" Version="7.2.452" />
<PackageReference Include="Microsoft.ServiceFabric.Data" Version="4.2.452" />
<PackageReference Include="Microsoft.ServiceFabric.Data.Extensions" Version="4.2.452" />
<PackageReference Include="Microsoft.ServiceFabric.Data.Interfaces" Version="4.2.452" />
<PackageReference Include="Microsoft.ServiceFabric.Diagnostics.Internal" Version="4.2.452" />
<PackageReference Include="Microsoft.ServiceFabric.Services" Version="4.2.452" />
<PackageReference Include="Microsoft.ServiceFabric.Services.Remoting" Version="4.2.452" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NLog" Version="4.7.10" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="5.0.1" />
<PackageReference Include="System.IO" Version="4.3.0" />
<PackageReference Include="System.Management" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.7" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Include="System.Runtime" Version="4.3.1" />
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.1" />
Expand Down
3 changes: 1 addition & 2 deletions FabricObserver/Observers/CertificateObserver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Cryptography.X509Certificates;
using System.ServiceModel;
using System.Threading;
using System.Threading.Tasks;
using System.Xml;
Expand Down Expand Up @@ -393,7 +392,7 @@ private async Task GetSecurityTypes(CancellationToken token)
}
else
{
throw new ActionNotSupportedException("if X509FindTime attribute, value should be FindBySubjectName");
throw new Exception("if X509FindTime attribute, value should be FindBySubjectName");
}
}

Expand Down
16 changes: 6 additions & 10 deletions FabricObserverApp/ApplicationPackageRoot/ApplicationManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@
<Parameter Name="FabricSystemObserverEnabled" DefaultValue="false" />
<Parameter Name="NetworkObserverEnabled" DefaultValue="false" />
<Parameter Name="NodeObserverEnabled" DefaultValue="true" />
<Parameter Name="OSObserverEnabled" DefaultValue="true" />
<Parameter Name="OSObserverEnabled" DefaultValue="false" />
<Parameter Name="SFConfigurationObserverEnabled" DefaultValue="false" />
<!-- AzureStorageUploadObserver is only useful for Windows today. Disable it for Linux.
You only need to enable this observer if you have set AppObserver to generate dump files when an Error threshold is
breached AND you supply Azure Storage account credentials in AzureStorageUploadObserver's settings in this file. -->
<Parameter Name="AzureStorageUploadObserverEnabled" DefaultValue="false" />
<Parameter Name="SampleNewObserverEnabled" DefaultValue="false" />
<!-- Telemetry - AppInsights or LogAnalytics -->
Expand All @@ -34,7 +31,7 @@
<Parameter Name="AzureStorageUploadObserverEnableTelemetry" DefaultValue="false" />
<Parameter Name="SampleNewObserverEnableTelemetry" DefaultValue="false" />
<!-- ETW - Custom EventSource Tracing -->
<Parameter Name="AppObserverEnableEtw" DefaultValue="true" />
<Parameter Name="AppObserverEnableEtw" DefaultValue="false" />
<Parameter Name="CertificateObserverEnableEtw" DefaultValue="false" />
<Parameter Name="DiskObserverEnableEtw" DefaultValue="false" />
<Parameter Name="FabricSystemObserverEnableEtw" DefaultValue="false" />
Expand Down Expand Up @@ -62,7 +59,7 @@
<!-- Monitor Durations (TimeSpan format, e.g., 00:00:00). This setting only applies to 3 observers. -->
<Parameter Name="AppObserverMonitorDuration" DefaultValue="00:00:02" />
<Parameter Name="FabricSystemObserverMonitorDuration" DefaultValue="00:00:01" />
<Parameter Name="NodeObserverMonitorDuration" DefaultValue="00:00:05" />
<Parameter Name="NodeObserverMonitorDuration" DefaultValue="00:00:03" />
<!-- Run Intervals (TimeSpan format, e.g., 0.00:00:00) -->
<Parameter Name="AppObserverRunInterval" DefaultValue="" />
<Parameter Name="CertificateObserverRunInterval" DefaultValue="1.00:00:00" />
Expand All @@ -84,9 +81,9 @@
<!-- Process family tree monitoring. -->
<Parameter Name="AppObserverEnableChildProcessMonitoring" DefaultValue="true" />
<Parameter Name="AppObserverMaxChildProcTelemetryDataCount" DefaultValue="5" />
<!-- Service process dumps (dumpProcessOnError feature). -->
<!-- You need to set AppObserverEnableProcessDumps setting to true here AND set dumpProcessOnError to true in AppObserver.config.json
if you want AppObserver to dump service processes when an Error threshold has been breached for some observed metric (e.g., memoryErrorLimitPercent). -->
<!-- Service process dumps (dumpProcessOnError feature). -->
<Parameter Name="AppObserverEnableProcessDumps" DefaultValue="false" />
<Parameter Name="AppObserverProcessDumpType" DefaultValue="MiniPlus" />
<!-- Max number of dumps to generate per service, per observed metric within a supplied TimeSpan window. See AppObserverMaxDumpsTimeWindow. -->
Expand Down Expand Up @@ -296,10 +293,10 @@
<Parameter Name="EnableVerboseLogging" Value="[AzureStorageUploadObserverEnableVerboseLogging]" />
<Parameter Name="RunInterval" Value="[AzureStorageUploadObserverRunInterval]" />
<Parameter Name="BlobContainerName" Value="[AzureStorageUploadObserverBlobContainerName]" />
<!-- Azure Storage Connection String -->
<!-- Azure Storage Auth: Either supply an encrypted Connection String or an account name and encrypted shared key. -->
<!-- Note that you *can* use plain text values that are unencrypted strings. This is NOT recommended, but the decision is yours. If you choose to do this,
then you must set IsEncrypted to false both in the below settings and the corresponding settings in Settings.xml. -->
<!-- Azure Storage Auth: Either supply an encrypted Connection String or an account name and encrypted shared key. -->
<!-- Azure Storage Connection String -->
<Parameter Name="AzureStorageConnectionString" Value="[AzureStorageUploadObserverStorageConnectionString]" IsEncrypted="true" />
<!-- OR use Account Name/Account Key pair if NOT using Connection String.. -->
<Parameter Name="AzureStorageAccountName" Value="[AzureStorageUploadObserverStorageAccountName]" />
Expand Down Expand Up @@ -341,7 +338,6 @@
</Principals>-->
<!-- This is important to set if you run FabricObserver as NetworkUser (Default) and you want to upload AppObserver's user service process dumps to your Azure Storage account
via AzureStorageUploadObserver using an encrypted storage account Connection String or Account Key.
Just supply the same thumbprint you used to encrypt your Storage Connection String or Account Key using the Invoke-ServiceFabricEncryptSecret cmdlet.
NOTE: If you need to run FabricObserver as System user - you will need to in order to monitor services that run as System or Admin user -, then you do not need to set this. -->
<Certificates>
Expand Down
8 changes: 4 additions & 4 deletions FabricObserverTests/FabricObserverTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="coverlet.collector" Version="3.0.2">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.5" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.5" />
<PackageReference Include="coverlet.collector" Version="3.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
27 changes: 26 additions & 1 deletion FabricObserverTests/ObserverTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,11 @@ public async Task ClusterObserver_ObserveAsync_Successful_Observer_IsHealthy()
[TestMethod]
public async Task Successful_CertificateObserver_Run_Cancellation_Via_ObserverManager()
{
if (!isSFRuntimePresentOnTestMachine)
{
return;
}

using var client = new FabricClient(FabricClientRole.User);

ObserverManager.FabricServiceContext = context;
Expand Down Expand Up @@ -445,6 +450,11 @@ public async Task Successful_ClusterObserver_Run_Cancellation_Via_ClusterObserve
[TestMethod]
public async Task Successful_FabricSystemObserver_Run_Cancellation_Via_ObserverManager()
{
if (!isSFRuntimePresentOnTestMachine)
{
return;
}

using var client = new FabricClient();

ObserverManager.FabricServiceContext = context;
Expand Down Expand Up @@ -476,7 +486,12 @@ public async Task Successful_FabricSystemObserver_Run_Cancellation_Via_ObserverM
[TestMethod]
public async Task Successful_NetworkObserver_Run_Cancellation_Via_ObserverManager()
{
using var client = new FabricClient(FabricClientRole.User);
if (!isSFRuntimePresentOnTestMachine)
{
return;
}

using var client = new FabricClient();

ObserverManager.FabricServiceContext = context;
ObserverManager.FabricClientInstance = client;
Expand All @@ -503,6 +518,11 @@ public async Task Successful_NetworkObserver_Run_Cancellation_Via_ObserverManage
[TestMethod]
public async Task Successful_NodeObserver_Run_Cancellation_Via_ObserverManager()
{
if (!isSFRuntimePresentOnTestMachine)
{
return;
}

using var client = new FabricClient();

ObserverManager.FabricServiceContext = context;
Expand Down Expand Up @@ -535,6 +555,11 @@ public async Task Successful_NodeObserver_Run_Cancellation_Via_ObserverManager()
[TestMethod]
public async Task Successful_OSObserver_Run_Cancellation_Via_ObserverManager()
{
if (!isSFRuntimePresentOnTestMachine)
{
return;
}

using var client = new FabricClient(FabricClientRole.User);

ObserverManager.FabricServiceContext = context;
Expand Down

0 comments on commit f639afb

Please sign in to comment.