-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add CLI command to replace DataProviders duchy list #970
Add CLI command to replace DataProviders duchy list #970
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @jojijac0b and @Marco-Premier)
src/main/kotlin/org/wfanet/measurement/kingdom/deploy/tools/CreateResource.kt
line 343 at r2 (raw file):
require(dataProviderId.toLongOrNull() != null) val request = ReplaceDataProviderRequiredDuchiesRequest()
you can do this with kotlin dsls
replaceDataProviderRequiredDuchiesRequest {
requiredExternalDuchyIds += requiredDuchies
externalDataProviderId = dataProviderId.toLong()
}
There was a problem hiding this 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: all files reviewed, 1 unresolved discussion (waiting on @stevenwarejones)
src/main/kotlin/org/wfanet/measurement/kingdom/deploy/tools/CreateResource.kt
line 343 at r2 (raw file):
Previously, stevenwarejones (Steven Ware Jones) wrote…
you can do this with kotlin dsls
replaceDataProviderRequiredDuchiesRequest { requiredExternalDuchyIds += requiredDuchies externalDataProviderId = dataProviderId.toLong() }
+1
There was a problem hiding this 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 r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jojijac0b)
There was a problem hiding this 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 r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jojijac0b)
src/main/kotlin/org/wfanet/measurement/kingdom/deploy/tools/CreateResource.kt
line 318 at r3 (raw file):
} @Command(
This should go in the MeasurementSystem CLI tool, not this one.
There was a problem hiding this 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 @SanjayVas)
src/main/kotlin/org/wfanet/measurement/kingdom/deploy/tools/CreateResource.kt
line 318 at r3 (raw file):
Previously, SanjayVas (Sanjay Vasandani) wrote…
This should go in the MeasurementSystem CLI tool, not this one.
Are the 2 CLI tool used by different actors @SanjayVas ?
Trying to understand why replace_data_provider_duchies
command should be part of a different CLI tool compared to data-provider
command.
There was a problem hiding this 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)
src/main/kotlin/org/wfanet/measurement/kingdom/deploy/tools/CreateResource.kt
line 318 at r3 (raw file):
Previously, Marco-Premier (marcopremier) wrote…
Are the 2 CLI tool used by different actors @SanjayVas ?
Trying to understand whyreplace_data_provider_duchies
command should be part of a different CLI tool compared todata-provider
command.
Yes. This CLI tool is for Kingdom operators and calls the internal API. Some method such as CreateDataProvider are intentionally not exposed in the public API, as these operations are not intended to be self-service.
The MeasurementSystem CLI tool is for the public API.
There was a problem hiding this 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 @jojijac0b)
src/main/kotlin/org/wfanet/measurement/kingdom/deploy/tools/CreateResource.kt
line 318 at r3 (raw file):
Previously, SanjayVas (Sanjay Vasandani) wrote…
Yes. This CLI tool is for Kingdom operators and calls the internal API. Some method such as CreateDataProvider are intentionally not exposed in the public API, as these operations are not intended to be self-service.
The MeasurementSystem CLI tool is for the public API.
Oh I see now. thanks for sharing this.
@jojijac0b we can move this into Measurement System then
There was a problem hiding this 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 2 files reviewed, 1 unresolved discussion (waiting on @Marco-Premier, @SanjayVas, and @stevenwarejones)
src/main/kotlin/org/wfanet/measurement/kingdom/deploy/tools/CreateResource.kt
line 343 at r2 (raw file):
Previously, Marco-Premier (marcopremier) wrote…
+1
Done.
src/main/kotlin/org/wfanet/measurement/kingdom/deploy/tools/CreateResource.kt
line 318 at r3 (raw file):
Previously, Marco-Premier (marcopremier) wrote…
Oh I see now. thanks for sharing this.
@jojijac0b we can move this into Measurement System then
Done.
There was a problem hiding this 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 r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @SanjayVas)
There was a problem hiding this 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 r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jojijac0b)
src/main/kotlin/org/wfanet/measurement/api/v2alpha/tools/MeasurementSystem.kt
line 1015 at r4 (raw file):
} @Command(
This CLI is organized into subcommands by resource. Add this as a replace-required-duchies
subcommand of a data-providers
command.
…ss-media-measurement into jojijacob-cli-for-replace-data-provider-duchy-list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @jojijac0b)
src/main/kotlin/org/wfanet/measurement/api/v2alpha/tools/MeasurementSystem.kt
line 1063 at r5 (raw file):
} @Command
was this meant to be added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @stevenwarejones)
src/main/kotlin/org/wfanet/measurement/api/v2alpha/tools/MeasurementSystem.kt
line 1063 at r5 (raw file):
Previously, stevenwarejones (Steven Ware Jones) wrote…
was this meant to be added?
it was a mistake. must remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @stevenwarejones)
src/main/kotlin/org/wfanet/measurement/api/v2alpha/tools/MeasurementSystem.kt
line 1063 at r5 (raw file):
Previously, jojijac0b wrote…
it was a mistake. must remove
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @SanjayVas and @stevenwarejones)
src/main/kotlin/org/wfanet/measurement/api/v2alpha/tools/MeasurementSystem.kt
line 1015 at r4 (raw file):
Previously, SanjayVas (Sanjay Vasandani) wrote…
This CLI is organized into subcommands by resource. Add this as a
replace-required-duchies
subcommand of adata-providers
command.
Done.
There was a problem hiding this 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 r7, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @jojijac0b and @stevenwarejones)
a discussion (no related file):
Update the unit test.
src/main/kotlin/org/wfanet/measurement/api/v2alpha/tools/MeasurementSystem.kt
line 1030 at r7 (raw file):
@Command( name = "replace-data-provider-duchies",
The DataProvider subject is implied
Suggestion:
replace-required-duchies
There was a problem hiding this 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 r7, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @jojijac0b)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @Marco-Premier, @SanjayVas, and @stevenwarejones)
a discussion (no related file):
Previously, SanjayVas (Sanjay Vasandani) wrote…
Update the unit test.
Done.
src/main/kotlin/org/wfanet/measurement/api/v2alpha/tools/MeasurementSystem.kt
line 1030 at r7 (raw file):
Previously, SanjayVas (Sanjay Vasandani) wrote…
The DataProvider subject is implied
Done.
There was a problem hiding this 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 r4, 2 of 2 files at r8, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @SanjayVas)
There was a problem hiding this 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 r8, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jojijac0b)
Create CLI command to replace DataProviders duchy list. The two required arguments are 1) data-provider-id and 2) required-duchies.
https://rally1.rallydev.com/#/604612930531d/iterationstatus?detail=%2Ftask%2F697342537849