feat(auditlog): ExecutionId on site SQLite schema + gRPC AuditEventDto
This commit is contained in:
@@ -114,6 +114,7 @@ public class SqliteAuditWriter : IAuditWriter, ISiteAuditQueue, IAsyncDisposable
|
|||||||
PayloadTruncated INTEGER NOT NULL,
|
PayloadTruncated INTEGER NOT NULL,
|
||||||
Extra TEXT NULL,
|
Extra TEXT NULL,
|
||||||
ForwardState TEXT NOT NULL,
|
ForwardState TEXT NOT NULL,
|
||||||
|
ExecutionId TEXT NULL,
|
||||||
PRIMARY KEY (EventId)
|
PRIMARY KEY (EventId)
|
||||||
);
|
);
|
||||||
CREATE INDEX IF NOT EXISTS IX_SiteAuditLog_ForwardState_Occurred
|
CREATE INDEX IF NOT EXISTS IX_SiteAuditLog_ForwardState_Occurred
|
||||||
@@ -221,12 +222,14 @@ public class SqliteAuditWriter : IAuditWriter, ISiteAuditQueue, IAsyncDisposable
|
|||||||
EventId, OccurredAtUtc, Channel, Kind, CorrelationId,
|
EventId, OccurredAtUtc, Channel, Kind, CorrelationId,
|
||||||
SourceSiteId, SourceInstanceId, SourceScript, Actor, Target,
|
SourceSiteId, SourceInstanceId, SourceScript, Actor, Target,
|
||||||
Status, HttpStatus, DurationMs, ErrorMessage, ErrorDetail,
|
Status, HttpStatus, DurationMs, ErrorMessage, ErrorDetail,
|
||||||
RequestSummary, ResponseSummary, PayloadTruncated, Extra, ForwardState
|
RequestSummary, ResponseSummary, PayloadTruncated, Extra, ForwardState,
|
||||||
|
ExecutionId
|
||||||
) VALUES (
|
) VALUES (
|
||||||
$EventId, $OccurredAtUtc, $Channel, $Kind, $CorrelationId,
|
$EventId, $OccurredAtUtc, $Channel, $Kind, $CorrelationId,
|
||||||
$SourceSiteId, $SourceInstanceId, $SourceScript, $Actor, $Target,
|
$SourceSiteId, $SourceInstanceId, $SourceScript, $Actor, $Target,
|
||||||
$Status, $HttpStatus, $DurationMs, $ErrorMessage, $ErrorDetail,
|
$Status, $HttpStatus, $DurationMs, $ErrorMessage, $ErrorDetail,
|
||||||
$RequestSummary, $ResponseSummary, $PayloadTruncated, $Extra, $ForwardState
|
$RequestSummary, $ResponseSummary, $PayloadTruncated, $Extra, $ForwardState,
|
||||||
|
$ExecutionId
|
||||||
);
|
);
|
||||||
""";
|
""";
|
||||||
|
|
||||||
@@ -250,6 +253,7 @@ public class SqliteAuditWriter : IAuditWriter, ISiteAuditQueue, IAsyncDisposable
|
|||||||
var pPayloadTruncated = cmd.Parameters.Add("$PayloadTruncated", SqliteType.Integer);
|
var pPayloadTruncated = cmd.Parameters.Add("$PayloadTruncated", SqliteType.Integer);
|
||||||
var pExtra = cmd.Parameters.Add("$Extra", SqliteType.Text);
|
var pExtra = cmd.Parameters.Add("$Extra", SqliteType.Text);
|
||||||
var pForwardState = cmd.Parameters.Add("$ForwardState", SqliteType.Text);
|
var pForwardState = cmd.Parameters.Add("$ForwardState", SqliteType.Text);
|
||||||
|
var pExecutionId = cmd.Parameters.Add("$ExecutionId", SqliteType.Text);
|
||||||
|
|
||||||
foreach (var pending in batch)
|
foreach (var pending in batch)
|
||||||
{
|
{
|
||||||
@@ -274,6 +278,7 @@ public class SqliteAuditWriter : IAuditWriter, ISiteAuditQueue, IAsyncDisposable
|
|||||||
pPayloadTruncated.Value = e.PayloadTruncated ? 1 : 0;
|
pPayloadTruncated.Value = e.PayloadTruncated ? 1 : 0;
|
||||||
pExtra.Value = (object?)e.Extra ?? DBNull.Value;
|
pExtra.Value = (object?)e.Extra ?? DBNull.Value;
|
||||||
pForwardState.Value = (e.ForwardState ?? AuditForwardState.Pending).ToString();
|
pForwardState.Value = (e.ForwardState ?? AuditForwardState.Pending).ToString();
|
||||||
|
pExecutionId.Value = (object?)e.ExecutionId?.ToString() ?? DBNull.Value;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -331,7 +336,8 @@ public class SqliteAuditWriter : IAuditWriter, ISiteAuditQueue, IAsyncDisposable
|
|||||||
SELECT EventId, OccurredAtUtc, Channel, Kind, CorrelationId,
|
SELECT EventId, OccurredAtUtc, Channel, Kind, CorrelationId,
|
||||||
SourceSiteId, SourceInstanceId, SourceScript, Actor, Target,
|
SourceSiteId, SourceInstanceId, SourceScript, Actor, Target,
|
||||||
Status, HttpStatus, DurationMs, ErrorMessage, ErrorDetail,
|
Status, HttpStatus, DurationMs, ErrorMessage, ErrorDetail,
|
||||||
RequestSummary, ResponseSummary, PayloadTruncated, Extra, ForwardState
|
RequestSummary, ResponseSummary, PayloadTruncated, Extra, ForwardState,
|
||||||
|
ExecutionId
|
||||||
FROM AuditLog
|
FROM AuditLog
|
||||||
WHERE ForwardState = $pending
|
WHERE ForwardState = $pending
|
||||||
ORDER BY OccurredAtUtc ASC, EventId ASC
|
ORDER BY OccurredAtUtc ASC, EventId ASC
|
||||||
@@ -379,7 +385,8 @@ public class SqliteAuditWriter : IAuditWriter, ISiteAuditQueue, IAsyncDisposable
|
|||||||
SELECT EventId, OccurredAtUtc, Channel, Kind, CorrelationId,
|
SELECT EventId, OccurredAtUtc, Channel, Kind, CorrelationId,
|
||||||
SourceSiteId, SourceInstanceId, SourceScript, Actor, Target,
|
SourceSiteId, SourceInstanceId, SourceScript, Actor, Target,
|
||||||
Status, HttpStatus, DurationMs, ErrorMessage, ErrorDetail,
|
Status, HttpStatus, DurationMs, ErrorMessage, ErrorDetail,
|
||||||
RequestSummary, ResponseSummary, PayloadTruncated, Extra, ForwardState
|
RequestSummary, ResponseSummary, PayloadTruncated, Extra, ForwardState,
|
||||||
|
ExecutionId
|
||||||
FROM AuditLog
|
FROM AuditLog
|
||||||
WHERE ForwardState = $forwarded
|
WHERE ForwardState = $forwarded
|
||||||
ORDER BY OccurredAtUtc ASC, EventId ASC
|
ORDER BY OccurredAtUtc ASC, EventId ASC
|
||||||
@@ -465,7 +472,8 @@ public class SqliteAuditWriter : IAuditWriter, ISiteAuditQueue, IAsyncDisposable
|
|||||||
SELECT EventId, OccurredAtUtc, Channel, Kind, CorrelationId,
|
SELECT EventId, OccurredAtUtc, Channel, Kind, CorrelationId,
|
||||||
SourceSiteId, SourceInstanceId, SourceScript, Actor, Target,
|
SourceSiteId, SourceInstanceId, SourceScript, Actor, Target,
|
||||||
Status, HttpStatus, DurationMs, ErrorMessage, ErrorDetail,
|
Status, HttpStatus, DurationMs, ErrorMessage, ErrorDetail,
|
||||||
RequestSummary, ResponseSummary, PayloadTruncated, Extra, ForwardState
|
RequestSummary, ResponseSummary, PayloadTruncated, Extra, ForwardState,
|
||||||
|
ExecutionId
|
||||||
FROM AuditLog
|
FROM AuditLog
|
||||||
WHERE ForwardState IN ($pending, $forwarded)
|
WHERE ForwardState IN ($pending, $forwarded)
|
||||||
AND OccurredAtUtc >= $since
|
AND OccurredAtUtc >= $since
|
||||||
@@ -642,6 +650,7 @@ public class SqliteAuditWriter : IAuditWriter, ISiteAuditQueue, IAsyncDisposable
|
|||||||
PayloadTruncated = reader.GetInt32(17) != 0,
|
PayloadTruncated = reader.GetInt32(17) != 0,
|
||||||
Extra = reader.IsDBNull(18) ? null : reader.GetString(18),
|
Extra = reader.IsDBNull(18) ? null : reader.GetString(18),
|
||||||
ForwardState = Enum.Parse<AuditForwardState>(reader.GetString(19)),
|
ForwardState = Enum.Parse<AuditForwardState>(reader.GetString(19)),
|
||||||
|
ExecutionId = reader.IsDBNull(20) ? null : Guid.Parse(reader.GetString(20)),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ public static class AuditEventDtoMapper
|
|||||||
Channel = evt.Channel.ToString(),
|
Channel = evt.Channel.ToString(),
|
||||||
Kind = evt.Kind.ToString(),
|
Kind = evt.Kind.ToString(),
|
||||||
CorrelationId = evt.CorrelationId?.ToString() ?? string.Empty,
|
CorrelationId = evt.CorrelationId?.ToString() ?? string.Empty,
|
||||||
|
ExecutionId = evt.ExecutionId?.ToString() ?? string.Empty,
|
||||||
SourceSiteId = evt.SourceSiteId ?? string.Empty,
|
SourceSiteId = evt.SourceSiteId ?? string.Empty,
|
||||||
SourceInstanceId = evt.SourceInstanceId ?? string.Empty,
|
SourceInstanceId = evt.SourceInstanceId ?? string.Empty,
|
||||||
SourceScript = evt.SourceScript ?? string.Empty,
|
SourceScript = evt.SourceScript ?? string.Empty,
|
||||||
@@ -92,6 +93,7 @@ public static class AuditEventDtoMapper
|
|||||||
Channel = Enum.Parse<AuditChannel>(dto.Channel),
|
Channel = Enum.Parse<AuditChannel>(dto.Channel),
|
||||||
Kind = Enum.Parse<AuditKind>(dto.Kind),
|
Kind = Enum.Parse<AuditKind>(dto.Kind),
|
||||||
CorrelationId = NullIfEmpty(dto.CorrelationId) is { } cid ? Guid.Parse(cid) : null,
|
CorrelationId = NullIfEmpty(dto.CorrelationId) is { } cid ? Guid.Parse(cid) : null,
|
||||||
|
ExecutionId = NullIfEmpty(dto.ExecutionId) is { } eid ? Guid.Parse(eid) : null,
|
||||||
SourceSiteId = NullIfEmpty(dto.SourceSiteId),
|
SourceSiteId = NullIfEmpty(dto.SourceSiteId),
|
||||||
SourceInstanceId = NullIfEmpty(dto.SourceInstanceId),
|
SourceInstanceId = NullIfEmpty(dto.SourceInstanceId),
|
||||||
SourceScript = NullIfEmpty(dto.SourceScript),
|
SourceScript = NullIfEmpty(dto.SourceScript),
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ message AuditEventDto {
|
|||||||
string response_summary = 17;
|
string response_summary = 17;
|
||||||
bool payload_truncated = 18;
|
bool payload_truncated = 18;
|
||||||
string extra = 19;
|
string extra = 19;
|
||||||
|
string execution_id = 20; // empty string represents null
|
||||||
}
|
}
|
||||||
|
|
||||||
message AuditEventBatch { repeated AuditEventDto events = 1; }
|
message AuditEventBatch { repeated AuditEventDto events = 1; }
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace ScadaLink.Communication.Grpc {
|
|||||||
"c3RhdGUYAyABKA4yGi5zaXRlc3RyZWFtLkFsYXJtU3RhdGVFbnVtEhAKCHBy",
|
"c3RhdGUYAyABKA4yGi5zaXRlc3RyZWFt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W5zdGFuY2VTdHJlYW1SZXF1ZXN0Ghsuc2l0ZXN0cmVhbS5T",
|
||||||
"Z2VzdEF1ZGl0RXZlbnRzEhsuc2l0ZXN0cmVhbS5BdWRpdEV2ZW50QmF0Y2ga",
|
"aXRlU3RyZWFtRXZlbnQwARJHChFJbmdlc3RBdWRpdEV2ZW50cxIbLnNpdGVz",
|
||||||
"FS5zaXRlc3RyZWFtLkluZ2VzdEFjaxJQChVJbmdlc3RDYWNoZWRUZWxlbWV0",
|
"dHJlYW0uQXVkaXRFdmVudEJhdGNoGhUuc2l0ZXN0cmVhbS5Jbmdlc3RBY2sS",
|
||||||
"cnkSIC5zaXRlc3RyZWFtLkNhY2hlZFRlbGVtZXRyeUJhdGNoGhUuc2l0ZXN0",
|
"UAoVSW5nZXN0Q2FjaGVkVGVsZW1ldHJ5EiAuc2l0ZXN0cmVhbS5DYWNoZWRU",
|
||||||
"cmVhbS5Jbmdlc3RBY2sSWgoPUHVsbEF1ZGl0RXZlbnRzEiIuc2l0ZXN0cmVh",
|
"ZWxlbWV0cnlCYXRjaBoVLnNpdGVzdHJlYW0uSW5nZXN0QWNrEloKD1B1bGxB",
|
||||||
"bS5QdWxsQXVkaXRFdmVudHNSZXF1ZXN0GiMuc2l0ZXN0cmVhbS5QdWxsQXVk",
|
"dWRpdEV2ZW50cxIiLnNpdGVzdHJlYW0uUHVsbEF1ZGl0RXZlbnRzUmVxdWVz",
|
||||||
"aXRFdmVudHNSZXNwb25zZUIfqgIcU2NhZGFMaW5rLkNvbW11bmljYXRpb24u",
|
"dBojLnNpdGVzdHJlYW0uUHVsbEF1ZGl0RXZlbnRzUmVzcG9uc2VCH6oCHFNj",
|
||||||
"R3JwY2IGcHJvdG8z"));
|
"YWRhTGluay5Db21tdW5pY2F0aW9uLkdycGNiBnByb3RvMw=="));
|
||||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||||
new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.WrappersReflection.Descriptor, },
|
new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.WrappersReflection.Descriptor, },
|
||||||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ScadaLink.Communication.Grpc.Quality), typeof(global::ScadaLink.Communication.Grpc.AlarmStateEnum), typeof(global::ScadaLink.Communication.Grpc.AlarmLevelEnum), }, null, new pbr::GeneratedClrTypeInfo[] {
|
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ScadaLink.Communication.Grpc.Quality), typeof(global::ScadaLink.Communication.Grpc.AlarmStateEnum), typeof(global::ScadaLink.Communication.Grpc.AlarmLevelEnum), }, null, new pbr::GeneratedClrTypeInfo[] {
|
||||||
@@ -96,7 +96,7 @@ namespace ScadaLink.Communication.Grpc {
|
|||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.SiteStreamEvent), global::ScadaLink.Communication.Grpc.SiteStreamEvent.Parser, new[]{ "CorrelationId", "AttributeChanged", "AlarmChanged" }, new[]{ "Event" }, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.SiteStreamEvent), global::ScadaLink.Communication.Grpc.SiteStreamEvent.Parser, new[]{ "CorrelationId", "AttributeChanged", "AlarmChanged" }, new[]{ "Event" }, null, null, null),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.AttributeValueUpdate), global::ScadaLink.Communication.Grpc.AttributeValueUpdate.Parser, new[]{ "InstanceUniqueName", "AttributePath", "AttributeName", "Value", "Quality", "Timestamp" }, null, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.AttributeValueUpdate), global::ScadaLink.Communication.Grpc.AttributeValueUpdate.Parser, new[]{ "InstanceUniqueName", "AttributePath", "AttributeName", "Value", "Quality", "Timestamp" }, null, null, null, null),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.AlarmStateUpdate), global::ScadaLink.Communication.Grpc.AlarmStateUpdate.Parser, new[]{ "InstanceUniqueName", "AlarmName", "State", "Priority", "Timestamp", "Level", "Message" }, null, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.AlarmStateUpdate), global::ScadaLink.Communication.Grpc.AlarmStateUpdate.Parser, new[]{ "InstanceUniqueName", "AlarmName", "State", "Priority", "Timestamp", "Level", "Message" }, null, null, null, null),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.AuditEventDto), global::ScadaLink.Communication.Grpc.AuditEventDto.Parser, new[]{ "EventId", "OccurredAtUtc", "Channel", "Kind", "CorrelationId", "SourceSiteId", "SourceInstanceId", "SourceScript", "Actor", "Target", "Status", "HttpStatus", "DurationMs", "ErrorMessage", "ErrorDetail", "RequestSummary", "ResponseSummary", "PayloadTruncated", "Extra" }, null, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.AuditEventDto), global::ScadaLink.Communication.Grpc.AuditEventDto.Parser, new[]{ "EventId", "OccurredAtUtc", "Channel", "Kind", "CorrelationId", "SourceSiteId", "SourceInstanceId", "SourceScript", "Actor", "Target", "Status", "HttpStatus", "DurationMs", "ErrorMessage", "ErrorDetail", "RequestSummary", "ResponseSummary", "PayloadTruncated", "Extra", "ExecutionId" }, null, null, null, null),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.AuditEventBatch), global::ScadaLink.Communication.Grpc.AuditEventBatch.Parser, new[]{ "Events" }, null, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.AuditEventBatch), global::ScadaLink.Communication.Grpc.AuditEventBatch.Parser, new[]{ "Events" }, null, null, null, null),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.IngestAck), global::ScadaLink.Communication.Grpc.IngestAck.Parser, new[]{ "AcceptedEventIds" }, null, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.IngestAck), global::ScadaLink.Communication.Grpc.IngestAck.Parser, new[]{ "AcceptedEventIds" }, null, null, null, null),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.SiteCallOperationalDto), global::ScadaLink.Communication.Grpc.SiteCallOperationalDto.Parser, new[]{ "TrackedOperationId", "Channel", "Target", "SourceSite", "Status", "RetryCount", "LastError", "HttpStatus", "CreatedAtUtc", "UpdatedAtUtc", "TerminalAtUtc" }, null, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.SiteCallOperationalDto), global::ScadaLink.Communication.Grpc.SiteCallOperationalDto.Parser, new[]{ "TrackedOperationId", "Channel", "Target", "SourceSite", "Status", "RetryCount", "LastError", "HttpStatus", "CreatedAtUtc", "UpdatedAtUtc", "TerminalAtUtc" }, null, null, null, null),
|
||||||
@@ -1591,6 +1591,7 @@ namespace ScadaLink.Communication.Grpc {
|
|||||||
responseSummary_ = other.responseSummary_;
|
responseSummary_ = other.responseSummary_;
|
||||||
payloadTruncated_ = other.payloadTruncated_;
|
payloadTruncated_ = other.payloadTruncated_;
|
||||||
extra_ = other.extra_;
|
extra_ = other.extra_;
|
||||||
|
executionId_ = other.executionId_;
|
||||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1838,6 +1839,21 @@ namespace ScadaLink.Communication.Grpc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>Field number for the "execution_id" field.</summary>
|
||||||
|
public const int ExecutionIdFieldNumber = 20;
|
||||||
|
private string executionId_ = "";
|
||||||
|
/// <summary>
|
||||||
|
/// empty string represents null
|
||||||
|
/// </summary>
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public string ExecutionId {
|
||||||
|
get { return executionId_; }
|
||||||
|
set {
|
||||||
|
executionId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public override bool Equals(object other) {
|
public override bool Equals(object other) {
|
||||||
@@ -1872,6 +1888,7 @@ namespace ScadaLink.Communication.Grpc {
|
|||||||
if (ResponseSummary != other.ResponseSummary) return false;
|
if (ResponseSummary != other.ResponseSummary) return false;
|
||||||
if (PayloadTruncated != other.PayloadTruncated) return false;
|
if (PayloadTruncated != other.PayloadTruncated) return false;
|
||||||
if (Extra != other.Extra) return false;
|
if (Extra != other.Extra) return false;
|
||||||
|
if (ExecutionId != other.ExecutionId) return false;
|
||||||
return Equals(_unknownFields, other._unknownFields);
|
return Equals(_unknownFields, other._unknownFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1898,6 +1915,7 @@ namespace ScadaLink.Communication.Grpc {
|
|||||||
if (ResponseSummary.Length != 0) hash ^= ResponseSummary.GetHashCode();
|
if (ResponseSummary.Length != 0) hash ^= ResponseSummary.GetHashCode();
|
||||||
if (PayloadTruncated != false) hash ^= PayloadTruncated.GetHashCode();
|
if (PayloadTruncated != false) hash ^= PayloadTruncated.GetHashCode();
|
||||||
if (Extra.Length != 0) hash ^= Extra.GetHashCode();
|
if (Extra.Length != 0) hash ^= Extra.GetHashCode();
|
||||||
|
if (ExecutionId.Length != 0) hash ^= ExecutionId.GetHashCode();
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
hash ^= _unknownFields.GetHashCode();
|
hash ^= _unknownFields.GetHashCode();
|
||||||
}
|
}
|
||||||
@@ -1990,6 +2008,10 @@ namespace ScadaLink.Communication.Grpc {
|
|||||||
output.WriteRawTag(154, 1);
|
output.WriteRawTag(154, 1);
|
||||||
output.WriteString(Extra);
|
output.WriteString(Extra);
|
||||||
}
|
}
|
||||||
|
if (ExecutionId.Length != 0) {
|
||||||
|
output.WriteRawTag(162, 1);
|
||||||
|
output.WriteString(ExecutionId);
|
||||||
|
}
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
_unknownFields.WriteTo(output);
|
_unknownFields.WriteTo(output);
|
||||||
}
|
}
|
||||||
@@ -2074,6 +2096,10 @@ namespace ScadaLink.Communication.Grpc {
|
|||||||
output.WriteRawTag(154, 1);
|
output.WriteRawTag(154, 1);
|
||||||
output.WriteString(Extra);
|
output.WriteString(Extra);
|
||||||
}
|
}
|
||||||
|
if (ExecutionId.Length != 0) {
|
||||||
|
output.WriteRawTag(162, 1);
|
||||||
|
output.WriteString(ExecutionId);
|
||||||
|
}
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
_unknownFields.WriteTo(ref output);
|
_unknownFields.WriteTo(ref output);
|
||||||
}
|
}
|
||||||
@@ -2141,6 +2167,9 @@ namespace ScadaLink.Communication.Grpc {
|
|||||||
if (Extra.Length != 0) {
|
if (Extra.Length != 0) {
|
||||||
size += 2 + pb::CodedOutputStream.ComputeStringSize(Extra);
|
size += 2 + pb::CodedOutputStream.ComputeStringSize(Extra);
|
||||||
}
|
}
|
||||||
|
if (ExecutionId.Length != 0) {
|
||||||
|
size += 2 + pb::CodedOutputStream.ComputeStringSize(ExecutionId);
|
||||||
|
}
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
size += _unknownFields.CalculateSize();
|
size += _unknownFields.CalculateSize();
|
||||||
}
|
}
|
||||||
@@ -2217,6 +2246,9 @@ namespace ScadaLink.Communication.Grpc {
|
|||||||
if (other.Extra.Length != 0) {
|
if (other.Extra.Length != 0) {
|
||||||
Extra = other.Extra;
|
Extra = other.Extra;
|
||||||
}
|
}
|
||||||
|
if (other.ExecutionId.Length != 0) {
|
||||||
|
ExecutionId = other.ExecutionId;
|
||||||
|
}
|
||||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2321,6 +2353,10 @@ namespace ScadaLink.Communication.Grpc {
|
|||||||
Extra = input.ReadString();
|
Extra = input.ReadString();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 162: {
|
||||||
|
ExecutionId = input.ReadString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -2425,6 +2461,10 @@ namespace ScadaLink.Communication.Grpc {
|
|||||||
Extra = input.ReadString();
|
Extra = input.ReadString();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 162: {
|
||||||
|
ExecutionId = input.ReadString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,9 +41,9 @@ public class SqliteAuditWriterSchemaTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void Opens_Creates_AuditLog_Table_With_20Columns_And_PK_On_EventId()
|
public void Opens_Creates_AuditLog_Table_With_21Columns_And_PK_On_EventId()
|
||||||
{
|
{
|
||||||
var (writer, dataSource) = CreateWriter(nameof(Opens_Creates_AuditLog_Table_With_20Columns_And_PK_On_EventId));
|
var (writer, dataSource) = CreateWriter(nameof(Opens_Creates_AuditLog_Table_With_21Columns_And_PK_On_EventId));
|
||||||
using (writer)
|
using (writer)
|
||||||
{
|
{
|
||||||
using var connection = OpenVerifierConnection(dataSource);
|
using var connection = OpenVerifierConnection(dataSource);
|
||||||
@@ -57,7 +57,7 @@ public class SqliteAuditWriterSchemaTests
|
|||||||
columns.Add((reader.GetString(1), reader.GetInt32(5)));
|
columns.Add((reader.GetString(1), reader.GetInt32(5)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Assert.Equal(20, columns.Count);
|
Assert.Equal(21, columns.Count);
|
||||||
|
|
||||||
var expected = new[]
|
var expected = new[]
|
||||||
{
|
{
|
||||||
@@ -65,7 +65,7 @@ public class SqliteAuditWriterSchemaTests
|
|||||||
"SourceSiteId", "SourceInstanceId", "SourceScript", "Actor", "Target",
|
"SourceSiteId", "SourceInstanceId", "SourceScript", "Actor", "Target",
|
||||||
"Status", "HttpStatus", "DurationMs", "ErrorMessage", "ErrorDetail",
|
"Status", "HttpStatus", "DurationMs", "ErrorMessage", "ErrorDetail",
|
||||||
"RequestSummary", "ResponseSummary", "PayloadTruncated", "Extra",
|
"RequestSummary", "ResponseSummary", "PayloadTruncated", "Extra",
|
||||||
"ForwardState",
|
"ForwardState", "ExecutionId",
|
||||||
};
|
};
|
||||||
Assert.Equal(expected.OrderBy(n => n), columns.Select(c => c.Name).OrderBy(n => n));
|
Assert.Equal(expected.OrderBy(n => n), columns.Select(c => c.Name).OrderBy(n => n));
|
||||||
|
|
||||||
|
|||||||
@@ -353,4 +353,37 @@ public class SqliteAuditWriterWriteTests
|
|||||||
await writer.MarkReconciledAsync(new[] { Guid.NewGuid(), Guid.NewGuid() });
|
await writer.MarkReconciledAsync(new[] { Guid.NewGuid(), Guid.NewGuid() });
|
||||||
// Completes without throwing.
|
// Completes without throwing.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ----- ExecutionId column (universal per-run correlation value) ----- //
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task WriteAsync_NonNullExecutionId_RoundTripsThroughMapRow()
|
||||||
|
{
|
||||||
|
var (writer, _) = CreateWriter(nameof(WriteAsync_NonNullExecutionId_RoundTripsThroughMapRow));
|
||||||
|
await using var _w = writer;
|
||||||
|
|
||||||
|
var executionId = Guid.NewGuid();
|
||||||
|
var evt = NewEvent() with { ExecutionId = executionId };
|
||||||
|
await writer.WriteAsync(evt);
|
||||||
|
|
||||||
|
var rows = await writer.ReadPendingAsync(limit: 10);
|
||||||
|
|
||||||
|
var row = Assert.Single(rows);
|
||||||
|
Assert.Equal(executionId, row.ExecutionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task WriteAsync_NullExecutionId_RoundTripsAsNull()
|
||||||
|
{
|
||||||
|
var (writer, _) = CreateWriter(nameof(WriteAsync_NullExecutionId_RoundTripsAsNull));
|
||||||
|
await using var _w = writer;
|
||||||
|
|
||||||
|
var evt = NewEvent() with { ExecutionId = null };
|
||||||
|
await writer.WriteAsync(evt);
|
||||||
|
|
||||||
|
var rows = await writer.ReadPendingAsync(limit: 10);
|
||||||
|
|
||||||
|
var row = Assert.Single(rows);
|
||||||
|
Assert.Null(row.ExecutionId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public class AuditEventDtoMapperTests
|
|||||||
var occurredAt = new DateTime(2026, 5, 20, 10, 15, 30, 123, DateTimeKind.Utc);
|
var occurredAt = new DateTime(2026, 5, 20, 10, 15, 30, 123, DateTimeKind.Utc);
|
||||||
var ingestedAt = new DateTime(2026, 5, 20, 10, 15, 31, 0, DateTimeKind.Utc);
|
var ingestedAt = new DateTime(2026, 5, 20, 10, 15, 31, 0, DateTimeKind.Utc);
|
||||||
var correlationId = Guid.NewGuid();
|
var correlationId = Guid.NewGuid();
|
||||||
|
var executionId = Guid.NewGuid();
|
||||||
var eventId = Guid.NewGuid();
|
var eventId = Guid.NewGuid();
|
||||||
|
|
||||||
var original = new AuditEvent
|
var original = new AuditEvent
|
||||||
@@ -29,6 +30,7 @@ public class AuditEventDtoMapperTests
|
|||||||
Channel = AuditChannel.ApiOutbound,
|
Channel = AuditChannel.ApiOutbound,
|
||||||
Kind = AuditKind.ApiCallCached,
|
Kind = AuditKind.ApiCallCached,
|
||||||
CorrelationId = correlationId,
|
CorrelationId = correlationId,
|
||||||
|
ExecutionId = executionId,
|
||||||
SourceSiteId = "site-1",
|
SourceSiteId = "site-1",
|
||||||
SourceInstanceId = "Pump01",
|
SourceInstanceId = "Pump01",
|
||||||
SourceScript = "OnDemand",
|
SourceScript = "OnDemand",
|
||||||
@@ -54,6 +56,7 @@ public class AuditEventDtoMapperTests
|
|||||||
Assert.Equal(original.Channel, roundTripped.Channel);
|
Assert.Equal(original.Channel, roundTripped.Channel);
|
||||||
Assert.Equal(original.Kind, roundTripped.Kind);
|
Assert.Equal(original.Kind, roundTripped.Kind);
|
||||||
Assert.Equal(original.CorrelationId, roundTripped.CorrelationId);
|
Assert.Equal(original.CorrelationId, roundTripped.CorrelationId);
|
||||||
|
Assert.Equal(original.ExecutionId, roundTripped.ExecutionId);
|
||||||
Assert.Equal(original.SourceSiteId, roundTripped.SourceSiteId);
|
Assert.Equal(original.SourceSiteId, roundTripped.SourceSiteId);
|
||||||
Assert.Equal(original.SourceInstanceId, roundTripped.SourceInstanceId);
|
Assert.Equal(original.SourceInstanceId, roundTripped.SourceInstanceId);
|
||||||
Assert.Equal(original.SourceScript, roundTripped.SourceScript);
|
Assert.Equal(original.SourceScript, roundTripped.SourceScript);
|
||||||
@@ -90,6 +93,7 @@ public class AuditEventDtoMapperTests
|
|||||||
var dto = AuditEventDtoMapper.ToDto(evt);
|
var dto = AuditEventDtoMapper.ToDto(evt);
|
||||||
|
|
||||||
Assert.Equal(string.Empty, dto.CorrelationId);
|
Assert.Equal(string.Empty, dto.CorrelationId);
|
||||||
|
Assert.Equal(string.Empty, dto.ExecutionId);
|
||||||
Assert.Equal(string.Empty, dto.SourceSiteId);
|
Assert.Equal(string.Empty, dto.SourceSiteId);
|
||||||
Assert.Equal(string.Empty, dto.SourceInstanceId);
|
Assert.Equal(string.Empty, dto.SourceInstanceId);
|
||||||
Assert.Equal(string.Empty, dto.SourceScript);
|
Assert.Equal(string.Empty, dto.SourceScript);
|
||||||
@@ -113,6 +117,7 @@ public class AuditEventDtoMapperTests
|
|||||||
Kind = nameof(AuditKind.ApiCall),
|
Kind = nameof(AuditKind.ApiCall),
|
||||||
Status = nameof(AuditStatus.Submitted),
|
Status = nameof(AuditStatus.Submitted),
|
||||||
CorrelationId = string.Empty,
|
CorrelationId = string.Empty,
|
||||||
|
ExecutionId = string.Empty,
|
||||||
SourceSiteId = string.Empty,
|
SourceSiteId = string.Empty,
|
||||||
SourceInstanceId = string.Empty,
|
SourceInstanceId = string.Empty,
|
||||||
SourceScript = string.Empty,
|
SourceScript = string.Empty,
|
||||||
@@ -128,6 +133,7 @@ public class AuditEventDtoMapperTests
|
|||||||
var evt = AuditEventDtoMapper.FromDto(dto);
|
var evt = AuditEventDtoMapper.FromDto(dto);
|
||||||
|
|
||||||
Assert.Null(evt.CorrelationId);
|
Assert.Null(evt.CorrelationId);
|
||||||
|
Assert.Null(evt.ExecutionId);
|
||||||
Assert.Null(evt.SourceSiteId);
|
Assert.Null(evt.SourceSiteId);
|
||||||
Assert.Null(evt.SourceInstanceId);
|
Assert.Null(evt.SourceInstanceId);
|
||||||
Assert.Null(evt.SourceScript);
|
Assert.Null(evt.SourceScript);
|
||||||
|
|||||||
Reference in New Issue
Block a user