mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 12:42:38 +00:00
bbb55034e3
All three components now report <major>.<minor>.<build> plus a 7-char commit and a build timestamp. The backend had been pinned at a hand-written 1.0.0 since inception and starts at 1.5.1000; the MCP server's package.json version was bumped by hand and starts at 1.5.300, and it now reports its own commit on /health instead of only the documentation bundle's. The build number keeps coming from a counter blob reserved before the build with ETag-CAS, but there is now one implementation instead of two copies: .github/scripts/Request-BuildNumber.ps1, called by all three workflows and by the local build.ps1. It lives under .github/ because scripts/Deployment/ is gitignored (those scripts carry SAS tokens) and would therefore be absent from a CI checkout; scripts/Build/ and scripts/Release/ are shadowed by the [Bb]uild/ and [Rr]elease/ artifact ignores. The counter cannot be replaced by the published manifest, which is the obvious simplification to reach for: version.json is written only on stable publish, so two consecutive dev builds would derive the same number and the second would overwrite the first's artifact. git rev-list --count fails the same way, two builds of one commit collide. Both deploy workflows now poll their health endpoint until it reports exactly the version and commit just deployed, and publish versions/<component>.json only then. A green deploy step alone means the package was accepted, not that it is being served -- so a manifest that disagrees with the live endpoint now means the running instance drifted (rollback, stale revision) rather than a pipeline that stopped halfway. The agent manifest gains the same commit and buildUtc fields additively; the bootstrap reads it by field name, so older installers ignore them, and sha256/bootstrapVersion stay untouched. Requires the versions container plus AZURE_BLOB_VERSIONS_SAS_TOKEN and the two seeded counters (backend 999, mcp 299) before the first deploy run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
84 lines
5.3 KiB
XML
84 lines
5.3 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net10.0</TargetFramework>
|
|
<AzureFunctionsVersion>V4</AzureFunctionsVersion>
|
|
<OutputType>Exe</OutputType>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<Nullable>enable</Nullable>
|
|
|
|
<!-- Backend version surfaced via /api/health. CommitHash is injected at CI time
|
|
through -p:SourceRevisionId=<github.sha> and appended to InformationalVersion.
|
|
BuildTimestampUtc is baked into the assembly as AssemblyMetadata so /api/health
|
|
reports the actual build moment — not the file mtime, which Azure Functions
|
|
resets to the zip-extract time on every cold start. CI may override via
|
|
-p:BuildTimestampUtc=<iso8601> to force a specific timestamp.
|
|
|
|
VersionPrefix is the curated part (bump by hand for a release); BuildNumber is
|
|
reserved per build from the counter blob versions/backend.txt and passed in as
|
|
-p:BuildNumber=<n> by deploy-backend.yml — same mechanism as the agent line.
|
|
A local build has no counter and stays at x.y.0 with an empty commit hash,
|
|
which is how /api/health tells a developer machine from a CI artifact. -->
|
|
<VersionPrefix>1.5</VersionPrefix>
|
|
<BuildNumber Condition="'$(BuildNumber)' == ''">0</BuildNumber>
|
|
<Version>$(VersionPrefix).$(BuildNumber)</Version>
|
|
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
|
<IncludeSourceRevisionInInformationalVersion>true</IncludeSourceRevisionInInformationalVersion>
|
|
<BuildTimestampUtc Condition="'$(BuildTimestampUtc)' == ''">$([System.DateTime]::UtcNow.ToString('o'))</BuildTimestampUtc>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
|
|
<_Parameter1>BuildTimestampUtc</_Parameter1>
|
|
<_Parameter2>$(BuildTimestampUtc)</_Parameter2>
|
|
</AssemblyAttribute>
|
|
<!-- Expose internals (e.g. BuildSessionIndexEntity, the SessionsIndex projection manifest) to tests. -->
|
|
<InternalsVisibleTo Include="AutopilotMonitor.Functions.Tests" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
|
<PackageReference Include="Azure.Identity" Version="1.21.0" />
|
|
<PackageReference Include="Azure.Monitor.Query" Version="1.5.0" />
|
|
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.23.0" />
|
|
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.51.0" />
|
|
<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="2.50.0" />
|
|
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.1.0" />
|
|
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.SignalRService" Version="2.0.1" />
|
|
<PackageReference Include="Microsoft.Azure.SignalR.Management" Version="1.33.0" />
|
|
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Timer" Version="4.3.1" />
|
|
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues" Version="5.5.4" />
|
|
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.7" />
|
|
<PackageReference Include="Azure.Data.Tables" Version="12.11.0" />
|
|
<PackageReference Include="Azure.Storage.Blobs" Version="12.27.0" />
|
|
<PackageReference Include="Azure.Storage.Queues" Version="12.25.0" />
|
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
|
<PackageReference Include="Microsoft.Identity.Web" Version="4.3.0" />
|
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.10" />
|
|
<!-- Security pins: Microsoft.Identity.Web 4.3.0 pulls these transitively at 10.0.0, which carries
|
|
known advisories (GHSA-9mv3-2cwr-p262 DataProtection; GHSA-37gx-xxp4-5rgx and siblings on
|
|
Cryptography.Xml). Force the patched 10.0.10 servicing build. Remove once Identity.Web ships
|
|
a dependency floor past the fix. -->
|
|
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="10.0.10" />
|
|
<PackageReference Include="System.Security.Cryptography.Xml" Version="10.0.10" />
|
|
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.0.25" />
|
|
<PackageReference Include="Resend" Version="0.2.1" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\..\Shared\AutopilotMonitor.Shared\AutopilotMonitor.Shared.csproj" />
|
|
<ProjectReference Include="..\..\Shared\AutopilotMonitor.DecisionCore\AutopilotMonitor.DecisionCore.csproj" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<EmbeddedResource Include="Security\Certificates\intune-root-*.pem" />
|
|
<EmbeddedResource Include="Security\Certificates\intune-intermediate-*.pem" />
|
|
<EmbeddedResource Include="..\..\..\rules\dist\gather-rules.json" LogicalName="AutopilotMonitor.Functions.Rules.gather-rules.json" />
|
|
<EmbeddedResource Include="..\..\..\rules\dist\analyze-rules.json" LogicalName="AutopilotMonitor.Functions.Rules.analyze-rules.json" />
|
|
<EmbeddedResource Include="..\..\..\rules\dist\ime-log-patterns.json" LogicalName="AutopilotMonitor.Functions.Rules.ime-log-patterns.json" />
|
|
<!-- CPE mapping seed + community files are loaded from GitHub via reseed, not embedded -->
|
|
<!-- Files at rules/dist/cpe-mapping-seed.json and rules/dist/cpe-community-mappings.json -->
|
|
</ItemGroup>
|
|
|
|
</Project>
|