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

return all buckets if privacy bucket mappers operative field set is empty #1396

Merged
merged 7 commits into from
Jan 10, 2024

Conversation

stevenwarejones
Copy link
Collaborator

…mpty

@wfa-reviewable
Copy link

This change is Reviewable

@uakyol
Copy link
Contributor

uakyol commented Jan 8, 2024

Thank you. While you are here, I think it will be good to also add a comment here that states if the operative fields are empty, normalization operation is not done.

Copy link
Contributor

@uakyol uakyol 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 6 files at r1, 4 of 4 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @SanjayVas)

Copy link
Member

@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 1 of 6 files at r1, 4 of 4 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @stevenwarejones)


src/main/kotlin/org/wfanet/measurement/eventdataprovider/privacybudgetmanagement/PrivacyBucketMapper.kt line 36 at r3 (raw file):

  /**
   * Returns if a [privacyBucketGroup] matches for a given cel [program]. Always returns true if

nit

Suggestion:

whether

src/main/kotlin/org/wfanet/measurement/eventdataprovider/privacybudgetmanagement/PrivacyBucketMapper.kt line 36 at r3 (raw file):

  /**
   * Returns if a [privacyBucketGroup] matches for a given cel [program]. Always returns true if

nit

Suggestion:

`true`

src/main/kotlin/org/wfanet/measurement/eventdataprovider/privacybudgetmanagement/testing/AlwaysChargingPrivacyBucketMapper.kt line 43 at r3 (raw file):

  override fun toEventMessage(privacyBucketGroup: PrivacyBucketGroup): Message {
    return testEvent {}

nit

Suggestion:

TestEvent.getDefaultInstance()

src/test/kotlin/org/wfanet/measurement/eventdataprovider/privacybudgetmanagement/PrivacyBucketFilterTest.kt line 274 at r3 (raw file):

  @Test
  fun `Mapper succeeds with empty operative fields`() {

nit: Generally tests methods should follow the pattern of " when ".

Suggestion:

getPrivacyBucketGroups returns all groups when mapper operativeFields is empty

Copy link
Member

@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, 4 unresolved discussions (waiting on @stevenwarejones)


src/test/kotlin/org/wfanet/measurement/eventdataprovider/privacybudgetmanagement/PrivacyBucketFilterTest.kt line 274 at r3 (raw file):
Sorry, formatting ate my comment.

"<MUT> <action> [when <condition>]"

Copy link
Collaborator Author

@stevenwarejones stevenwarejones left a comment

Choose a reason for hiding this comment

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

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

@stevenwarejones stevenwarejones merged commit d4b9a65 into main Jan 10, 2024
5 checks passed
@stevenwarejones stevenwarejones deleted the stevenwarejones_pbm_empty_operative_support branch January 10, 2024 03:17
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.

4 participants