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

Validate creation of event group metadata descriptor #1057

Conversation

tristanvuong2021
Copy link
Contributor

No description provided.

@wfa-reviewable
Copy link

This change is Reviewable

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 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @tristanvuong2021)


src/main/kotlin/org/wfanet/measurement/kingdom/service/api/v2alpha/EventGroupMetadataDescriptorsService.kt line 144 at r2 (raw file):

      ProtoReflection.buildDescriptors(listOf(request.eventGroupMetadataDescriptor.descriptorSet))
    } catch (e: DescriptorValidationException) {
      failGrpc(Status.INVALID_ARGUMENT) { "DescriptorSet is invalid" }

nit: include exception as cause for interceptor logging. Also use the field name as listed in the message definition if referencing a field.

Suggestion:

throw Status.INVALID_ARGUMENT.withCause(e).withDescription("descriptor_set is invalid").asRuntimeException()

Copy link
Collaborator

@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 1 of 2 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Marco-Premier)

@tristanvuong2021 tristanvuong2021 merged commit f20ad88 into main Jun 14, 2023
@tristanvuong2021 tristanvuong2021 deleted the tristanvuong-validate-creation-of-event-group-metadata-descriptor branch June 14, 2023 17:51
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