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

Removal of hard dependency of Application Insights > Open Telemetry #1366

Merged
merged 43 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
021ef24
Removal of hard dependency of Application Insights > Open Telemetry
qdraw Feb 5, 2024
72b1102
remove app insights features
qdraw Feb 5, 2024
7dc0bc9
add metrics WIP
qdraw Feb 5, 2024
e5c77f4
rm
qdraw Feb 5, 2024
1534ac4
Merge branch 'master' into feature/202402_rm_app_insights_direct
qdraw Feb 6, 2024
a455519
rm csproj
qdraw Feb 6, 2024
252d4d0
WIP
qdraw Feb 6, 2024
2506c3a
Merge branch 'master' into feature/202402_rm_app_insights_direct
qdraw Feb 7, 2024
063d131
WIP
qdraw Feb 7, 2024
34b8f5b
Enable nullable in more projects
qdraw Feb 7, 2024
10bce1c
spaceing by dotnet-sdk-version-update
qdraw Feb 7, 2024
b7c8045
rm
qdraw Feb 7, 2024
f712716
Merge branch 'master' into feature/202402_rm_app_insights_direct
qdraw Feb 7, 2024
7217ce7
fix test and fix nulable
qdraw Feb 7, 2024
0e03154
remove app insights references
qdraw Feb 7, 2024
b51849a
[Swagger] Auto commited swagger/openapi list
qdraw Feb 7, 2024
b05ae40
update CSP header
qdraw Feb 7, 2024
71c475a
tile layer issues
qdraw Feb 7, 2024
e988643
move fetch into different folder && rm unused usings && null references
qdraw Feb 7, 2024
c0dec62
add security text
qdraw Feb 7, 2024
177ed6b
keep a changelog
qdraw Feb 7, 2024
bf1d4cc
disable unused code && fix for bool bug
qdraw Feb 8, 2024
e30b2c6
add const
qdraw Feb 8, 2024
017710f
code format web project
qdraw Feb 8, 2024
a96ef8e
update packages && code format
qdraw Feb 8, 2024
322b645
dotnet format
qdraw Feb 8, 2024
4cd1d08
chmod +x
qdraw Feb 8, 2024
1eb3c2f
code smells
qdraw Feb 8, 2024
70f7435
code smells
qdraw Feb 8, 2024
31c537d
code smells
qdraw Feb 8, 2024
98ed59a
nullable
qdraw Feb 8, 2024
ebb4e4f
nullable2
qdraw Feb 8, 2024
fb09ac1
add parent id
qdraw Feb 9, 2024
ed0ecc9
change metric name
qdraw Feb 9, 2024
4c60f63
add extra info
qdraw Feb 9, 2024
97fb8ac
new ef core way
qdraw Feb 9, 2024
0fa10a1
add annotations
qdraw Feb 9, 2024
df76867
Data migration && add limit
qdraw Feb 9, 2024
2fdb647
add , "Microsoft.Hosting.Lifetime": "Information" && code format…
qdraw Feb 9, 2024
f7efc1e
suppress warnings
qdraw Feb 9, 2024
5bef02e
enable r2r && change order build server && add headers to CSP
qdraw Feb 9, 2024
af59103
supresss warning for lowercase names
qdraw Feb 9, 2024
2cb0d49
remove core from name
qdraw Feb 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 8 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_within_query_expression_clauses = true
csharp_wrap_before_eq = false
place_attribute_on_same_line = "never"
csharp_style_namespace_declarations = file_scoped:warning
# csharp_style_namespace_declarations = file_scoped:warning

# Indentation preferences
csharp_indent_block_contents = true
Expand All @@ -65,3 +65,10 @@ dotnet_code_quality_unused_parameters = all:warning
dotnet_remove_unnecessary_suppression_exclusions = none:warning

dotnet_style_namespace_match_folder = true:suggestion

# unused usings
dotnet_diagnostic.IDE0005.severity = warning

# CS4014: Because this call is not awaited, execution of the current method continues before the call is completed.
# Consider applying the 'await' operator to the result of the call.
dotnet_diagnostic.CS4014.severity = error
15 changes: 7 additions & 8 deletions documentation/Program.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
using System.Diagnostics;

static string GetSolutionParentFolder()
static string GetSolutionParentFolder()
{
var strExeFilePath = System.Reflection.Assembly.GetExecutingAssembly().Location;
return Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(strExeFilePath))))!;
return Path.GetDirectoryName(
Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(strExeFilePath))))!;
}

static Process NpmCommand(string command)
{
var startInfo = new ProcessStartInfo()
var startInfo = new ProcessStartInfo
{
FileName = "npm",
Arguments = command,
WorkingDirectory = GetSolutionParentFolder()
};
var proc = new Process() { StartInfo = startInfo };
FileName = "npm", Arguments = command, WorkingDirectory = GetSolutionParentFolder()
};
var proc = new Process { StartInfo = startInfo };
return proc;
}

Expand Down
3 changes: 2 additions & 1 deletion documentation/docs/developer-guide/contributing/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Breaking changes are reported in the [changelog/history](https://docs.qdraw.nl/d

| Version | Supported |
|---------|--------------------|
| 0.5.x | :white_check_mark: |
| 0.6.x | :white_check_mark: |
| 0.5.x | :x: |
| 0.4.x | :x: |
| < 0.3 | :x: |

Expand Down
81 changes: 0 additions & 81 deletions documentation/static/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4501,39 +4501,6 @@
"parameters": [],
"extensions": {}
},
"/api/health/application-insights": {
"operations": {
"Get": {
"tags": [
{
"name": "Health",
"extensions": {},
"unresolvedReference": false
}
],
"summary": "Add Application Insights script to user context",
"parameters": [],
"responses": {
"200": {
"description": "Ok",
"headers": {},
"content": {},
"links": {},
"extensions": {},
"unresolvedReference": false
}
},
"callbacks": {},
"deprecated": false,
"security": [],
"servers": [],
"extensions": {}
}
},
"servers": [],
"parameters": [],
"extensions": {}
},
"/api/health/version": {
"operations": {
"Post": {
Expand Down Expand Up @@ -11856,54 +11823,6 @@
"extensions": {},
"unresolvedReference": false
},
"applicationInsightsConnectionString": {
"type": "string",
"readOnly": false,
"writeOnly": false,
"allOf": [],
"oneOf": [],
"anyOf": [],
"required": [],
"properties": {},
"additionalPropertiesAllowed": true,
"enum": [],
"nullable": true,
"deprecated": false,
"extensions": {},
"unresolvedReference": false
},
"applicationInsightsLog": {
"type": "boolean",
"readOnly": false,
"writeOnly": false,
"allOf": [],
"oneOf": [],
"anyOf": [],
"required": [],
"properties": {},
"additionalPropertiesAllowed": true,
"enum": [],
"nullable": true,
"deprecated": false,
"extensions": {},
"unresolvedReference": false
},
"applicationInsightsDatabaseTracking": {
"type": "boolean",
"readOnly": false,
"writeOnly": false,
"allOf": [],
"oneOf": [],
"anyOf": [],
"required": [],
"properties": {},
"additionalPropertiesAllowed": true,
"enum": [],
"nullable": true,
"deprecated": false,
"extensions": {},
"unresolvedReference": false
},
"maxDegreesOfParallelism": {
"type": "integer",
"format": "int32",
Expand Down
1 change: 1 addition & 0 deletions pipelines/azure/app-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ stages:
- template: /pipelines/azure/steps/build_server.yml
parameters:
vstest: false
readyToRunEnabled: true
runtimeArg: '--runtime "win-x64,linux-x64,osx-x64,osx-arm64"'
nugetPackages: $(NUGET_PACKAGES)

Expand Down
8 changes: 4 additions & 4 deletions pipelines/azure/steps/build_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ parameters:
nugetPackages: $(Pipeline.Workspace)/.nuget/packages

steps:
- template: /pipelines/azure/steps/cache_nuget_packages.yml
- template: /pipelines/azure/steps/cache_dependencies.yml

- task: DotNetCoreCLI@2
displayName: "[Nuke/server] dotnet tool restore"
continueOnError: true
Expand All @@ -14,11 +17,8 @@ steps:
custom: tool
arguments: "restore --tool-manifest starsky/.config/dotnet-tools.json"

- template: /pipelines/azure/steps/cache_nuget_packages.yml
- template: /pipelines/azure/steps/cache_dependencies.yml

- task: PowerShell@2
displayName: "Nuke SonarBuildTest (with tests) "
displayName: "Nuke SonarBuildTest (with tests)"
condition: and(succeeded(), eq('${{ parameters.vstest }}', true) )
env:
BUILD_SOURCEBRANCH: $(Build.SourceBranch)
Expand Down
2 changes: 1 addition & 1 deletion pipelines/azure/steps/use_dotnet_version.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk 8.0.101'
displayName: 'Use .NET SDK 8.0.101'
enabled: true
inputs:
packageType: sdk
Expand Down
2 changes: 1 addition & 1 deletion starsky-tools/build-tools/dotnet-sdk-version-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ async function updateAzureYmlFile(filePathList, sdkVersion) {
fileContent = fileContent.replace(
displayNameTagRegex,
displayNameTag +
"'Use .NET Core sdk " +
"'Use .NET SDK " +
sdkVersion +
"'"
);
Expand Down
20 changes: 13 additions & 7 deletions starsky/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<Project>
<PropertyGroup>
<RuntimeIdentifier Condition="'$(OverwriteRuntimeIdentifier)' != ''">$(OverwriteRuntimeIdentifier)</RuntimeIdentifier>
<SelfContained Condition="'$(OverwriteRuntimeIdentifier)' != ''">true</SelfContained>
<Copyright>"Copyright (c) 2018 - $([System.DateTime]::Now.ToString(`yyyy`)) Qdraw and other authors"</Copyright>
<Authors>Qdraw and contributors</Authors>
<Company>Qdraw</Company>
</PropertyGroup>
<PropertyGroup>
<RuntimeIdentifier Condition="'$(OverwriteRuntimeIdentifier)' != ''">$(OverwriteRuntimeIdentifier)</RuntimeIdentifier>
<SelfContained Condition="'$(OverwriteRuntimeIdentifier)' != ''">true</SelfContained>
<Copyright>"Copyright (c) 2018 - $([System.DateTime]::Now.ToString(`yyyy`)) Qdraw and other authors"</Copyright>
<Authors>Qdraw and contributors</Authors>
<Company>Qdraw</Company>
</PropertyGroup>
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591;CS1573</NoWarn>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

</Project>
16 changes: 8 additions & 8 deletions starsky/build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public sealed class Build : NukeBuild
/// Nuget & NPM dependencies are always installed
/// </summary>
[Parameter("Skip Dependencies download e.g. exiftool / " +
"geo data, nuget/npm deps are always installed")]
"geo data, nuget/npm deps are always installed")]
readonly bool NoDependencies;

/// <summary>
Expand Down Expand Up @@ -94,7 +94,7 @@ bool IsPublishDisabled()
/// </summary>
/// <returns>only if overwritten</returns>
[Parameter("Overwrite branch name")]
readonly string Branch;
readonly string Branch = string.Empty;

/// <summary>
/// Overwrite Branch name
Expand All @@ -104,7 +104,7 @@ string GetBranchName()
{
var branchName = Branch;
if ( !string.IsNullOrEmpty(branchName) &&
branchName.StartsWith("refs/heads/") )
branchName.StartsWith("refs/heads/") )
{
branchName = branchName.Replace("refs/heads/", "");
}
Expand Down Expand Up @@ -147,7 +147,7 @@ List<string> GetRuntimesWithoutGeneric()
/// Solution .sln file
/// </summary>
[Solution(SuppressBuildProjectCheck = true)]
readonly Solution Solution;
readonly Solution Solution = new();

/// <summary>
/// List of output projects
Expand Down Expand Up @@ -236,7 +236,7 @@ void ShowSettingsInfo()
$"Current RID: {RuntimeIdentifier.GetCurrentRuntimeIdentifier()}");

Log.Information("SolutionParentFolder: " +
WorkingDirectory.GetSolutionParentFolder());
WorkingDirectory.GetSolutionParentFolder());

Log.Information(NoClient
? "Client is: disabled"
Expand All @@ -251,8 +251,8 @@ void ShowSettingsInfo()
: "Publish: enabled");

Log.Information(NoSonar ||
string.IsNullOrEmpty(SonarQube.GetSonarKey()) ||
string.IsNullOrEmpty(SonarQube.GetSonarToken())
string.IsNullOrEmpty(SonarQube.GetSonarKey()) ||
string.IsNullOrEmpty(SonarQube.GetSonarToken())
? "Sonarcloud scan: disabled"
: "Sonarcloud scan: enabled");

Expand Down Expand Up @@ -311,7 +311,7 @@ void ShowSettingsInfo()
Configuration);
DotnetTestHelper.TestNetCoreGenericCommand(Configuration,
IsUnitTestDisabled());
DotnetGenericHelper.DownloadDependencies(Configuration, GeoCliCsproj,
DotnetGenericHelper.DownloadDependencies(Configuration, GeoCliCsproj,
NoDependencies, GenericRuntimeName);
MergeCoverageFiles.Merge(IsUnitTestDisabled());
SonarQube.SonarEnd(IsUnitTestDisabled(), NoSonar);
Expand Down
56 changes: 28 additions & 28 deletions starsky/build/_build.csproj
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace />
<NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
<NukeScriptDirectory>..</NukeScriptDirectory>
<NukeTelemetryVersion>1</NukeTelemetryVersion>
<!-- https://github.com/nuke-build/nuke/issues/818 -->
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace/>
<NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
<NukeScriptDirectory>..</NukeScriptDirectory>
<NukeTelemetryVersion>1</NukeTelemetryVersion>
<Nullable>enable</Nullable>
<ProjectGuid>{b0a4bfd3-6321-4962-a15c-142aace9a4c9}</ProjectGuid>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="8.0.0" />
<PackageReference Include="Nuke.Common" Version="7.0.6" />
<PackageReference Include="ReportGenerator.Core" Version="5.2.0" />
<PackageReference Include="SimpleExec" Version="11.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1"/>
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="8.0.0"/>
<PackageReference Include="Nuke.Common" Version="8.0.0" />
<PackageReference Include="ReportGenerator.Core" Version="5.2.1" />
<PackageReference Include="SimpleExec" Version="12.0.0" />
</ItemGroup>

<ItemGroup>
<Compile Remove="logs\**" />
</ItemGroup>
<ItemGroup>
<Compile Remove="logs\**"/>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Remove="logs\**" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="logs\**"/>
</ItemGroup>

<ItemGroup>
<None Remove="logs\**"/>
</ItemGroup>

<ItemGroup>
<None Remove="logs\**" />
</ItemGroup>

</Project>
14 changes: 7 additions & 7 deletions starsky/build/helpers/ClientHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace helpers
{

public static class ClientHelper
{
public static string GetClientAppFolder()
Expand All @@ -20,26 +20,26 @@ public static string GetClientAppFolder()
throw new DirectoryNotFoundException("rootDirectory is null, this is wrong");
return Path.Combine(rootDirectory, ClientAppFolder);
}

public static void NpmPreflight()
{
Log.Information("Checking if Npm (and implicit: Node) is installed, will fail if not on this step");
Run(NpmBaseCommand, "-v");

Log.Information("Checking if Node is installed, will fail if not on this step");
Run(NodeBaseCommand, "-v");
}
}

public static void ClientCiCommand()
{
Run(NpmBaseCommand, "ci --legacy-peer-deps --prefer-offline --no-audit --no-fund", GetClientAppFolder());
}

public static void ClientBuildCommand()
{
Run(NpmBaseCommand, "run build", GetClientAppFolder());
}

public static void ClientTestCommand()
{
Run(NpmBaseCommand, "run test:ci", GetClientAppFolder());
Expand Down
Loading
Loading