Skip to content

Commit

Permalink
Using CMMS event group key for CMMS event groups. (#1038)
Browse files Browse the repository at this point in the history
Bug-fix for issue #1034
  • Loading branch information
riemanli authored May 31, 2023
1 parent fde690f commit 72e3798
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import org.wfanet.measurement.api.v2alpha.DataProvider
import org.wfanet.measurement.api.v2alpha.DataProviderKey
import org.wfanet.measurement.api.v2alpha.DataProvidersGrpcKt.DataProvidersCoroutineStub
import org.wfanet.measurement.api.v2alpha.EncryptionPublicKey
import org.wfanet.measurement.api.v2alpha.EventGroupKey as CmmsEventGroupKey
import org.wfanet.measurement.api.v2alpha.Measurement
import org.wfanet.measurement.api.v2alpha.Measurement.DataProviderEntry
import org.wfanet.measurement.api.v2alpha.MeasurementConsumer
Expand Down Expand Up @@ -1120,7 +1121,12 @@ class ReportsService(

eventGroupKey to
RequisitionSpecKt.eventGroupEntry {
key = eventGroupName
key =
CmmsEventGroupKey(
internalEventGroupKey.dataProviderReferenceId,
internalEventGroupKey.eventGroupReferenceId
)
.toName()
value =
RequisitionSpecKt.EventGroupEntryKt.value {
collectionInterval = timeInterval
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import org.wfanet.measurement.api.v2alpha.DataProviderKey
import org.wfanet.measurement.api.v2alpha.DataProvidersGrpcKt.DataProvidersCoroutineImplBase
import org.wfanet.measurement.api.v2alpha.DataProvidersGrpcKt.DataProvidersCoroutineStub
import org.wfanet.measurement.api.v2alpha.EncryptionPublicKey
import org.wfanet.measurement.api.v2alpha.EventGroupKey as CmmsEventGroupKey
import org.wfanet.measurement.api.v2alpha.GetDataProviderRequest
import org.wfanet.measurement.api.v2alpha.Measurement
import org.wfanet.measurement.api.v2alpha.Measurement.DataProviderEntry.Value.ENCRYPTED_REQUISITION_SPEC_FIELD_NUMBER
Expand Down Expand Up @@ -535,7 +536,7 @@ private val EVENT_GROUP_ENTRIES =
{ DataProviderKey(it.dataProviderReferenceId) },
{
eventGroupEntry {
key = it.toName()
key = CmmsEventGroupKey(it.dataProviderReferenceId, it.eventGroupReferenceId).toName()
value =
EventGroupEntryKt.value {
collectionInterval = MEASUREMENT_TIME_INTERVAL
Expand Down

0 comments on commit 72e3798

Please sign in to comment.