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

Fix always-true conditional check in SpannerDataProviderService #986

Merged
merged 3 commits into from
May 10, 2023

Conversation

Marco-Premier
Copy link
Contributor

No description provided.

@wfa-reviewable
Copy link

This change is Reviewable

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 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jojijac0b, @Marco-Premier, and @SanjayVas)


src/main/kotlin/org/wfanet/measurement/kingdom/deploy/gcloud/spanner/SpannerDataProvidersService.kt line 57 at r1 (raw file):

    request: ReplaceDataProviderRequiredDuchiesRequest
  ): DataProvider {
    grpcRequire(request.externalDataProviderId > 0L) { "externalDataProviderId field is missing." }

Should be != in case in the future we want to allow negatives and this wouldn't silently break.

Copy link
Contributor Author

@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: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @jojijac0b, @SanjayVas, and @tristanvuong2021)


src/main/kotlin/org/wfanet/measurement/kingdom/deploy/gcloud/spanner/SpannerDataProvidersService.kt line 57 at r1 (raw file):

Previously, tristanvuong2021 (Tristan Vuong) wrote…

Should be != in case in the future we want to allow negatives and this wouldn't silently break.

That's interesting, thanks

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

@Marco-Premier Marco-Premier removed the request for review from jojijac0b May 10, 2023 07:16
@Marco-Premier Marco-Premier merged commit c997cca into main May 10, 2023
@Marco-Premier Marco-Premier deleted the marcopremier-fix-wrong-grpcrequire-check branch May 10, 2023 08:38
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