Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update EventGroup resource pattern in Reporting v2 API. #1064

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

SanjayVas
Copy link
Member

@SanjayVas SanjayVas commented Jun 13, 2023

This takes advantage of the secondary resource pattern for EventGroups in the CMMS API.

@wfa-reviewable
Copy link

This change is Reviewable

@SanjayVas SanjayVas force-pushed the sanjayvas-mc-event-groups branch from 9b3591a to 2e5c8b3 Compare June 13, 2023 22:36
@SanjayVas SanjayVas force-pushed the sanjayvas-reporting-v2-event-group branch from 1201c39 to 23a9fb3 Compare June 13, 2023 22:36
@SanjayVas SanjayVas requested a review from riemanli June 13, 2023 22:43
@SanjayVas SanjayVas force-pushed the sanjayvas-reporting-v2-event-group branch from 23a9fb3 to ff4e03b Compare June 13, 2023 23:12
Copy link
Contributor

@tristanvuong2021 tristanvuong2021 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 13 of 14 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @riemanli)

Copy link
Contributor

@riemanli riemanli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 14 of 14 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @SanjayVas)


src/main/kotlin/org/wfanet/measurement/reporting/service/api/v2alpha/ReportingSetsService.kt line 517 at r1 (raw file):

  return InternalReportingSetKt.primitive {
    eventGroupKeys +=
      source.cmmsEventGroupsList.map { cmmsEventGroup ->

How do we make sure that the measurement consumer has the permission to those event groups? Or is that their responsibility to maintain a valid set of event groups?

@SanjayVas SanjayVas requested a review from riemanli June 14, 2023 16:49
Copy link
Member Author

@SanjayVas SanjayVas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @riemanli)


src/main/kotlin/org/wfanet/measurement/reporting/service/api/v2alpha/ReportingSetsService.kt line 517 at r1 (raw file):

Previously, riemanli (Rieman) wrote…

How do we make sure that the measurement consumer has the permission to those event groups? Or is that their responsibility to maintain a valid set of event groups?

It's up to the MC to put in EventGroups that belong to them, the same as they would when using the CMMS API. Generally they'd only have their own EGs that they got from calling ListEventGroups.

Ultimate enforcement would happen during Requisition fulfillment. An EDP should refuse Requisitions for an MC if any EventGroups don't belong to that MC.

Copy link
Contributor

@riemanli riemanli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @SanjayVas)

@SanjayVas SanjayVas force-pushed the sanjayvas-mc-event-groups branch from e977044 to 85f44d2 Compare June 14, 2023 17:57
@SanjayVas SanjayVas force-pushed the sanjayvas-reporting-v2-event-group branch from ff4e03b to 7d73ba4 Compare June 14, 2023 17:57
@SanjayVas SanjayVas force-pushed the sanjayvas-reporting-v2-event-group branch 2 times, most recently from cd23432 to 697fce3 Compare June 14, 2023 18:49
@SanjayVas SanjayVas force-pushed the sanjayvas-mc-event-groups branch from 7943b20 to 0e514de Compare June 15, 2023 20:29
@SanjayVas SanjayVas force-pushed the sanjayvas-reporting-v2-event-group branch 2 times, most recently from 055c80d to af73529 Compare June 20, 2023 18:27
@SanjayVas SanjayVas force-pushed the sanjayvas-mc-event-groups branch from 0e514de to 21ff462 Compare June 20, 2023 18:27
@SanjayVas SanjayVas self-assigned this Jun 21, 2023
Copy link
Contributor

@Marco-Premier Marco-Premier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 9 of 14 files at r1, 2 of 2 files at r2, 1 of 1 files at r3, 3 of 3 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @SanjayVas and @stevenwarejones)


src/main/proto/wfa/measurement/internal/reporting/v2/reporting_set.proto line 34 at r4 (raw file):

    message EventGroupKey {
      // `DataProvider` ID from the CMMS public API.
      string cmms_data_provider_id = 1;

Is this being used already? e.g. is the number changing allowed in this case?

Code quote:

1;

@SanjayVas SanjayVas requested a review from Marco-Premier June 23, 2023 17:42
Copy link
Member Author

@SanjayVas SanjayVas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Marco-Premier and @stevenwarejones)


src/main/proto/wfa/measurement/internal/reporting/v2/reporting_set.proto line 34 at r4 (raw file):

Previously, Marco-Premier (marcopremier) wrote…

Is this being used already? e.g. is the number changing allowed in this case?

Yes, it's allowed because this is not yet being used. There aren't yet deployment artifacts for it, so it can't yet be used.

@SanjayVas SanjayVas force-pushed the sanjayvas-mc-event-groups branch from 21ff462 to 5797103 Compare June 26, 2023 15:04
@SanjayVas SanjayVas force-pushed the sanjayvas-reporting-v2-event-group branch 2 times, most recently from 29f7b5c to d68c615 Compare June 26, 2023 18:09
@SanjayVas SanjayVas force-pushed the sanjayvas-mc-event-groups branch from 5797103 to 443c1e1 Compare June 26, 2023 18:09
@SanjayVas SanjayVas force-pushed the sanjayvas-reporting-v2-event-group branch from d68c615 to 8c7781c Compare June 26, 2023 18:32
@SanjayVas SanjayVas force-pushed the sanjayvas-mc-event-groups branch from 443c1e1 to 1320cd3 Compare June 26, 2023 18:32
Base automatically changed from sanjayvas-mc-event-groups to main June 26, 2023 19:38
@SanjayVas SanjayVas force-pushed the sanjayvas-reporting-v2-event-group branch from 8c7781c to 31afb2e Compare June 26, 2023 19:39
@SanjayVas SanjayVas removed the request for review from stevenwarejones June 26, 2023 19:40
@SanjayVas SanjayVas removed their assignment Jun 26, 2023
Copy link
Contributor

@Marco-Premier Marco-Premier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @SanjayVas)

@SanjayVas SanjayVas force-pushed the sanjayvas-reporting-v2-event-group branch from 31afb2e to 7e88faa Compare June 27, 2023 16:51
Copy link
Member Author

@SanjayVas SanjayVas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @SanjayVas)

@SanjayVas SanjayVas enabled auto-merge (squash) June 27, 2023 16:52
@SanjayVas SanjayVas force-pushed the sanjayvas-reporting-v2-event-group branch from 7e88faa to b7044e2 Compare June 27, 2023 18:06
Copy link
Member Author

@SanjayVas SanjayVas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 8 of 14 files at r1, 2 of 2 files at r2, 1 of 1 files at r3, 2 of 3 files at r4, 1 of 1 files at r6, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @SanjayVas)

@SanjayVas SanjayVas merged commit e2b3419 into main Jun 27, 2023
@SanjayVas SanjayVas deleted the sanjayvas-reporting-v2-event-group branch June 27, 2023 18:57
ple13 pushed a commit that referenced this pull request Aug 16, 2024
This takes advantage of the secondary resource pattern for EventGroups in the CMMS API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants