up
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
AOC Guard CI / aoc-guard (push) Has been cancelled
AOC Guard CI / aoc-verify (push) Has been cancelled
Concelier Attestation Tests / attestation-tests (push) Has been cancelled
Export Center CI / export-ci (push) Has been cancelled
Notify Smoke Test / Notify Unit Tests (push) Has been cancelled
Notify Smoke Test / Notifier Service Tests (push) Has been cancelled
Notify Smoke Test / Notification Smoke Test (push) Has been cancelled
Policy Lint & Smoke / policy-lint (push) Has been cancelled
Scanner Analyzers / Discover Analyzers (push) Has been cancelled
Scanner Analyzers / Build Analyzers (push) Has been cancelled
Scanner Analyzers / Test Language Analyzers (push) Has been cancelled
Scanner Analyzers / Validate Test Fixtures (push) Has been cancelled
Scanner Analyzers / Verify Deterministic Output (push) Has been cancelled
Signals CI & Image / signals-ci (push) Has been cancelled
Signals Reachability Scoring & Events / reachability-smoke (push) Has been cancelled
Signals Reachability Scoring & Events / sign-and-upload (push) Has been cancelled
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
AOC Guard CI / aoc-guard (push) Has been cancelled
AOC Guard CI / aoc-verify (push) Has been cancelled
Concelier Attestation Tests / attestation-tests (push) Has been cancelled
Export Center CI / export-ci (push) Has been cancelled
Notify Smoke Test / Notify Unit Tests (push) Has been cancelled
Notify Smoke Test / Notifier Service Tests (push) Has been cancelled
Notify Smoke Test / Notification Smoke Test (push) Has been cancelled
Policy Lint & Smoke / policy-lint (push) Has been cancelled
Scanner Analyzers / Discover Analyzers (push) Has been cancelled
Scanner Analyzers / Build Analyzers (push) Has been cancelled
Scanner Analyzers / Test Language Analyzers (push) Has been cancelled
Scanner Analyzers / Validate Test Fixtures (push) Has been cancelled
Scanner Analyzers / Verify Deterministic Output (push) Has been cancelled
Signals CI & Image / signals-ci (push) Has been cancelled
Signals Reachability Scoring & Events / reachability-smoke (push) Has been cancelled
Signals Reachability Scoring & Events / sign-and-upload (push) Has been cancelled
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using StellaOps.Replay.Serialization;
|
||||
|
||||
namespace StellaOps.Replay.Core;
|
||||
|
||||
@@ -12,10 +11,10 @@ public static class ReplayCollections
|
||||
public const string Subjects = "replay_subjects";
|
||||
}
|
||||
|
||||
[BsonIgnoreExtraElements]
|
||||
[IgnoreExtraElements]
|
||||
public sealed class ReplayRunRecord
|
||||
{
|
||||
[BsonId]
|
||||
[Id]
|
||||
public string Id { get; set; } = string.Empty; // scan UUID
|
||||
|
||||
public string ManifestHash { get; set; } = string.Empty; // sha256:...
|
||||
@@ -48,10 +47,10 @@ public sealed class ReplaySignatureRecord
|
||||
= false;
|
||||
}
|
||||
|
||||
[BsonIgnoreExtraElements]
|
||||
[IgnoreExtraElements]
|
||||
public sealed class ReplayBundleRecord
|
||||
{
|
||||
[BsonId]
|
||||
[Id]
|
||||
public string Id { get; set; } = string.Empty; // sha256 hex
|
||||
|
||||
public string Type { get; set; } = string.Empty; // input|output|rootpack|reachability
|
||||
@@ -64,10 +63,10 @@ public sealed class ReplayBundleRecord
|
||||
public DateTime CreatedAt { get; set; } = DateTime.SpecifyKind(DateTime.UnixEpoch, DateTimeKind.Utc);
|
||||
}
|
||||
|
||||
[BsonIgnoreExtraElements]
|
||||
[IgnoreExtraElements]
|
||||
public sealed class ReplaySubjectRecord
|
||||
{
|
||||
[BsonId]
|
||||
[Id]
|
||||
public string OciDigest { get; set; } = string.Empty;
|
||||
|
||||
public List<ReplayLayerRecord> Layers { get; set; } = new();
|
||||
@@ -82,7 +81,7 @@ public sealed class ReplayLayerRecord
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Index names to keep mongod migrations deterministic.
|
||||
/// Index names to keep database migrations deterministic.
|
||||
/// </summary>
|
||||
public static class ReplayIndexes
|
||||
{
|
||||
15
src/__Libraries/StellaOps.Replay.Core/SerializationCompat.cs
Normal file
15
src/__Libraries/StellaOps.Replay.Core/SerializationCompat.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace StellaOps.Replay.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Compatibility attribute to mark a property as the document ID.
|
||||
/// This is a no-op shim for document serialization.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
|
||||
public sealed class IdAttribute : Attribute;
|
||||
|
||||
/// <summary>
|
||||
/// Compatibility attribute to ignore extra elements during deserialization.
|
||||
/// This is a no-op shim for document serialization.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
|
||||
public sealed class IgnoreExtraElementsAttribute : Attribute;
|
||||
@@ -6,7 +6,6 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ZstdSharp.Port" Version="0.8.6" />
|
||||
<PackageReference Include="MongoDB.Bson" Version="2.25.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\StellaOps.Cryptography\StellaOps.Cryptography.csproj" />
|
||||
|
||||
Reference in New Issue
Block a user