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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5.1.0
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Set up Node.js
uses: actions/setup-node@v6.2.0
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5.1.0
with:
dotnet-version: 7.0.x
dotnet-version: 10.0.x
- name: Set up Node.js
uses: actions/setup-node@v6.2.0
with:
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
org.opencontainers.image.created=${{ steps.date.outputs.date }}
org.opencontainers.image.title=ServicePulse
org.opencontainers.image.description=ServicePulse provides real-time production monitoring for distributed applications. It monitors the health of a system's endpoints, detects processing errors, sends failed messages for reprocessing, and ensures the specific environment's needs are met, all in one consolidated dashboard.
org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:8.0-noble-chiseled-composite
org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite
annotations: |
index:org.opencontainers.image.source=https://github.com/Particular/ServicePulse/tree/${{ github.sha }}
index:org.opencontainers.image.authors="Particular Software"
Expand All @@ -182,7 +182,7 @@ jobs:
index:org.opencontainers.image.created=${{ steps.date.outputs.date }}
index:org.opencontainers.image.title=ServicePulse
index:org.opencontainers.image.description=ServicePulse provides real-time production monitoring for distributed applications. It monitors the health of a system's endpoints, detects processing errors, sends failed messages for reprocessing, and ensures the specific environment's needs are met, all in one consolidated dashboard.
index:org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:8.0-noble-chiseled-composite
index:org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite
file: src/ServicePulse/Dockerfile
tags: ghcr.io/particular/servicepulse:${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || env.MinVerVersion }}

2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.400",
"version": "10.0.100",
"rollForward": "latestFeature"
}
}
21 changes: 13 additions & 8 deletions src/Frontend/test/specs/monitoring/sorting-endpoints.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { expect } from "vitest";
import { test, describe } from "../../drivers/vitest/driver";
import { waitFor } from "@testing-library/vue";
import { groupEndpointsBy } from "./actions/groupEndpointsBy";
import { endpointGroupNames } from "./questions/endpointGroupNames";
import { endpointGroup } from "./questions/endpointGroup";
Expand Down Expand Up @@ -68,10 +69,12 @@ describe("FEATURE: Endpoint sorting", () => {
await sortEndpointsBy({ column: columnName.ENDPOINTNAME });

//Assert
expect(endpointGroupNames()).toEqual(["Universe.Solarsystem.Venus", "Universe.Solarsystem.Mercury", "Universe.Solarsystem.Earth"]);
expect(endpointGroup("Universe.Solarsystem.Venus").Endpoints).toEqual(["Endpoint4", "Endpoint3"]);
expect(endpointGroup("Universe.Solarsystem.Mercury").Endpoints).toEqual(["Endpoint2", "Endpoint1"]);
expect(endpointGroup("Universe.Solarsystem.Earth").Endpoints).toEqual(["Endpoint6", "Endpoint5"]);
await waitFor(() => {
expect(endpointGroupNames()).toEqual(["Universe.Solarsystem.Venus", "Universe.Solarsystem.Mercury", "Universe.Solarsystem.Earth"]);
expect(endpointGroup("Universe.Solarsystem.Venus").Endpoints).toEqual(["Endpoint4", "Endpoint3"]);
expect(endpointGroup("Universe.Solarsystem.Mercury").Endpoints).toEqual(["Endpoint2", "Endpoint1"]);
expect(endpointGroup("Universe.Solarsystem.Earth").Endpoints).toEqual(["Endpoint6", "Endpoint5"]);
});
});

test("EXAMPLE: Endpoints inside of the groups and group names should be sorted in ascending order when clicking twice on the endpoint name column title", async ({ driver }) => {
Expand All @@ -95,10 +98,12 @@ describe("FEATURE: Endpoint sorting", () => {
await sortEndpointsBy({ column: columnName.ENDPOINTNAME }); //Click the column title again for ascending

//Assert
expect(endpointGroupNames()).toEqual(["Universe.Solarsystem.Earth", "Universe.Solarsystem.Mercury", "Universe.Solarsystem.Venus"]);
expect(endpointGroup("Universe.Solarsystem.Earth").Endpoints).toEqual(["Endpoint5", "Endpoint6"]);
expect(endpointGroup("Universe.Solarsystem.Mercury").Endpoints).toEqual(["Endpoint1", "Endpoint2"]);
expect(endpointGroup("Universe.Solarsystem.Venus").Endpoints).toEqual(["Endpoint3", "Endpoint4"]);
await waitFor(() => {
expect(endpointGroupNames()).toEqual(["Universe.Solarsystem.Earth", "Universe.Solarsystem.Mercury", "Universe.Solarsystem.Venus"]);
expect(endpointGroup("Universe.Solarsystem.Earth").Endpoints).toEqual(["Endpoint5", "Endpoint6"]);
expect(endpointGroup("Universe.Solarsystem.Mercury").Endpoints).toEqual(["Endpoint1", "Endpoint2"]);
expect(endpointGroup("Universe.Solarsystem.Venus").Endpoints).toEqual(["Endpoint3", "Endpoint4"]);
});
});
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<Description>Particular ServicePulse binaries for use by Particular.PlatformSample. Not intended for use outside of Particular.PlatformSample.</Description>
Expand Down
3 changes: 1 addition & 2 deletions src/ServicePulse.Host/Hosting/HostArguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,7 @@ void ValidateArgs()
goto case ExecutionMode.Run;

case ExecutionMode.Run:
Uri spUri;
if (!Uri.TryCreate(Url, UriKind.Absolute, out spUri) || (!validProtocols.Contains(spUri.Scheme, StringComparer.OrdinalIgnoreCase)))
if (!Uri.TryCreate(Url, UriKind.Absolute, out Uri spUri) || (!validProtocols.Contains(spUri.Scheme, StringComparer.OrdinalIgnoreCase)))
{
throw new Exception("The value specified for 'url' is not a valid URL");
}
Expand Down
4 changes: 2 additions & 2 deletions src/ServicePulse.Tests/ServicePulse.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand All @@ -13,7 +13,7 @@

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="3.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.24" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageReference Include="NUnit" Version="4.5.0" />
<PackageReference Include="NUnit3TestAdapter" Version="6.1.0" />
Expand Down
4 changes: 2 additions & 2 deletions src/ServicePulse/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ RUN npm install
RUN npm run build

# Host build image
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build
ARG TARGETARCH
WORKDIR /
ENV CI=true
COPY --from=frontend . .
RUN dotnet publish src/ServicePulse/ServicePulse.csproj -a $TARGETARCH -o /app

# Host runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble-chiseled-composite
FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite
WORKDIR /app

ENV ASPNETCORE_HTTP_PORTS=9090
Expand Down
2 changes: 1 addition & 1 deletion src/ServicePulse/ServicePulse.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
Expand Down
1 change: 0 additions & 1 deletion src/ServicePulse/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Net;
using System.Text.Json;
using Microsoft.Extensions.Logging;
using IPNetwork = Microsoft.AspNetCore.HttpOverrides.IPNetwork;

class Settings
{
Expand Down
4 changes: 2 additions & 2 deletions src/ServicePulse/WebApplicationBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static X509Certificate2 LoadCertificate(Settings settings)
}

return string.IsNullOrEmpty(settings.HttpsCertificatePassword)
? new X509Certificate2(certPath)
: new X509Certificate2(certPath, settings.HttpsCertificatePassword);
? X509CertificateLoader.LoadCertificateFromFile(certPath)
: X509CertificateLoader.LoadPkcs12FromFile(certPath, settings.HttpsCertificatePassword);
}
}
6 changes: 3 additions & 3 deletions src/ServicePulse/WebApplicationExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static void UseForwardedHeaders(this WebApplication app, Settings setting

// Configuration
var knownProxies = settings.ForwardedHeadersKnownProxies.Select(p => p.ToString()).ToArray();
var knownNetworks = settings.ForwardedHeadersKnownNetworks.Select(n => $"{n.Prefix}/{n.PrefixLength}").ToArray();
var knownNetworks = settings.ForwardedHeadersKnownNetworks.Select(n => $"{n.BaseAddress}/{n.PrefixLength}").ToArray();

return new
{
Expand Down Expand Up @@ -58,7 +58,7 @@ public static void UseForwardedHeaders(this WebApplication app, Settings setting

// Clear default loopback-only restrictions
options.KnownProxies.Clear();
options.KnownNetworks.Clear();
options.KnownIPNetworks.Clear();

// Enabled by default
if (settings.ForwardedHeadersTrustAllProxies)
Expand All @@ -76,7 +76,7 @@ public static void UseForwardedHeaders(this WebApplication app, Settings setting

foreach (var network in settings.ForwardedHeadersKnownNetworks)
{
options.KnownNetworks.Add(network);
options.KnownIPNetworks.Add(network);
}
}

Expand Down