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: Update Kingdom's duchy id config to select fulfillingDuchyId for HMSS #1737

Merged
merged 5 commits into from
Aug 20, 2024

Conversation

renjiezh
Copy link
Contributor

@renjiezh renjiezh commented Aug 6, 2024

No description provided.

@wfa-reviewable
Copy link

This change is Reviewable

@renjiezh
Copy link
Contributor Author

renjiezh commented Aug 6, 2024

Fix #1735

@renjiezh renjiezh changed the title fix: Update Kingdom's duchy id config to select fulfillingDuchyId for HMSS fix!: Update Kingdom's duchy id config to select fulfillingDuchyId for HMSS Aug 6, 2024
@renjiezh
Copy link
Contributor Author

renjiezh commented Aug 6, 2024

Deployment needs to update the content of hmss_protocol_config_config.textproto

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.

The --hmss_protocol_config_config flag was only added in b836fc7, which has never made it into a full release, so we don't need to specifically call it out in 0.5.7 release notes. It's still indeed a breaking change though.

Reviewed 13 of 13 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ple13 and @renjiezh)


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

import org.wfanet.measurement.kingdom.deploy.gcloud.spanner.writers.SpannerWriter.TransactionScope

private const val HMSS_MINIMUM_NUMBER_OF_REQUIRED_DUCHIES = 3

nit: this is technically not just the minimum, but also the maximum

Suggestion:

HMSS_DUCHY_COUNT

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

import org.wfanet.measurement.kingdom.deploy.gcloud.spanner.writers.SpannerWriter.TransactionScope

private const val HMSS_MINIMUM_NUMBER_OF_REQUIRED_DUCHIES = 3

nit: define new constants in companion object. See https://github.com/world-federation-of-advertisers/cross-media-measurement/blob/main/docs/code-style.md#kotlin

Suggestion:

HMSS_REQUIRED_DUCHIES

Copy link
Contributor

@ple13 ple13 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 13 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @renjiezh)


src/main/kotlin/org/wfanet/measurement/duchy/service/api/v2alpha/RequisitionFulfillmentService.kt line 57 at r1 (raw file):

/** Implementation of `wfa.measurement.api.v2alpha.RequisitionFulfillment` gRPC service. */
class RequisitionFulfillmentService(
  private val duchyId: String,

nit: use externalDuchyId instead of duchyId.

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


src/main/kotlin/org/wfanet/measurement/duchy/service/api/v2alpha/RequisitionFulfillmentService.kt line 57 at r1 (raw file):

Previously, ple13 (Phi) wrote…

nit: use externalDuchyId instead of duchyId.

In public service impls, any ID is assumed to be the external ID. The public service impl doesn't even have access to the internal DB IDs. Those are a private implementation detail of the internal service impl.

@renjiezh renjiezh changed the title fix!: Update Kingdom's duchy id config to select fulfillingDuchyId for HMSS fix: Update Kingdom's duchy id config to select fulfillingDuchyId for HMSS Aug 8, 2024
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 11 of 13 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @renjiezh)


src/main/kotlin/org/wfanet/measurement/kingdom/deploy/gcloud/spanner/writers/CreateMeasurements.kt line 476 at r2 (raw file):

  companion object {
    private const val HMSS_DUCHY_COUNT = 3

this feel really ugly to bury this here in a spanner write. I'd prefer it either stay in the protocol config or be a flag passed in or something like that.

Copy link
Contributor Author

@renjiezh renjiezh 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: 11 of 16 files reviewed, 1 unresolved discussion (waiting on @ple13, @SanjayVas, and @stevenwarejones)


src/main/kotlin/org/wfanet/measurement/kingdom/deploy/gcloud/spanner/writers/CreateMeasurements.kt line 476 at r2 (raw file):

Previously, stevenwarejones (Steven Ware Jones) wrote…

this feel really ugly to bury this here in a spanner write. I'd prefer it either stay in the protocol config or be a flag passed in or something like that.

Done.
Good point.

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

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 13 files at r1, 5 of 5 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @renjiezh)

@renjiezh renjiezh enabled auto-merge (squash) August 14, 2024 21:46
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 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @renjiezh)

@renjiezh renjiezh merged commit 2134bee into main Aug 20, 2024
4 checks passed
@renjiezh renjiezh deleted the renjiez-fix-fulfilling-duchy-id-mismatch branch August 20, 2024 00:00
@TNATALI TNATALI added this to the v0.5.9 milestone Oct 9, 2024
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.

6 participants