Skip to content

Commit

Permalink
feat: Add create_time to internal Requisition parent_measurement (#1851)
Browse files Browse the repository at this point in the history
feature: Add create_time to internal Requisition parent_measurement
  • Loading branch information
tristanvuong2021 authored Oct 11, 2024
1 parent a30679f commit dc1dfe3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ class RequisitionReader : SpannerReader<RequisitionReader.Result>() {
ExternalMeasurementId,
ExternalDataProviderId,
Measurements.State AS MeasurementState,
CreateTime,
ExternalComputationId,
CertificateId,
MeasurementDetails
Expand Down Expand Up @@ -185,6 +186,7 @@ class RequisitionReader : SpannerReader<RequisitionReader.Result>() {
CertificateDetails,
MeasurementState,
MeasurementDetails,
FilteredRequisitions.CreateTime,
(
SELECT
count(ExternalDataProviderId),
Expand Down Expand Up @@ -308,6 +310,7 @@ class RequisitionReader : SpannerReader<RequisitionReader.Result>() {
protocolConfig = measurementDetails.protocolConfig
state = struct.getProtoEnum("MeasurementState", Measurement.State::forNumber)
dataProvidersCount = dataProviderCount
createTime = struct.getTimestamp("CreateTime").toProto()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,7 @@ abstract class MeasurementsServiceTest<T : MeasurementsCoroutineImplBase> {
liquidLegionsV2 = ProtocolConfig.LiquidLegionsV2.getDefaultInstance()
}
dataProvidersCount = 1
createTime = createdMeasurement.createTime
}
details = requisitionDetails {
dataProviderPublicKey = dataProviderValue.dataProviderPublicKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ abstract class RequisitionsServiceTest<T : RequisitionsCoroutineService> {
liquidLegionsV2 = ProtocolConfig.LiquidLegionsV2.getDefaultInstance()
}
dataProvidersCount = 1
createTime = measurement.createTime
}
}
assertThat(requisition)
Expand Down Expand Up @@ -667,6 +668,7 @@ abstract class RequisitionsServiceTest<T : RequisitionsCoroutineService> {
state = Measurement.State.PENDING_REQUISITION_FULFILLMENT
protocolConfig = protocolConfig { direct = ProtocolConfig.Direct.getDefaultInstance() }
dataProvidersCount = 1
createTime = measurement.createTime
}
}
assertThat(requisition)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ message Requisition {
Measurement.State state = 6;

int32 data_providers_count = 7;

google.protobuf.Timestamp create_time = 9;
}
// Denormalized fields from the parent Measurement. Output-only.
ParentMeasurement parent_measurement = 12;
Expand Down

0 comments on commit dc1dfe3

Please sign in to comment.