This PR proposes a set of updates to decouple the panel match client libraries from the v2alpha API.
This is NOT intended to be merged as-is, but rather to prove the feasibility of decoupling and to gather some initial feedback on the overall approach. If there are no major concerns, I will split this into several smaller PRs and send those for separate review.
This PR touches a lot of files. The interesting bits are mostly in src/main/kotlin/org/wfanet/panelmatch/client/launcher if you just need to get the gist.
Summary of changes:
Introduces panel match internal versions of ExchangeWorkflow and ExchangeStepAttempt protobuf messages.
Exchange task logic now uses the internal ExchangeWorkflow exclusively.
Relevant tools have been updated to accept a --exchange-workflow-format flag to be compatible with both the v2alpha messages and the new internal ones. Supported formats are:
V2ALPHA - For exchanges that continue to use the Kingdom-based protocol with v2alpha messages.
KINGDOMLESS - For exchanges that have adopted the upcoming Kingdom-less protocol with panel match internal messages.
Code related to claiming / validating / launching exchange tasks updated as follows:
ApiClient.ClaimedExchangeStep - Updated to remove references to v2alpha concepts. Notable changes:
The attemptKey for a step is now a panel match internal ExchangeStepAttemptKey with mostly the same info as before but no references to a "resource name".
Rather than creating a panel match internal ExchangeStep message, instead ported the necessary fields directly into ClaimedExchangeStep. These are: exchangeDate, stepIndex, and workflow.
New field:workflowFingerprint. When a claimed exchange step is being validated, the existing logic compares the serialized workflow returned by the Kingdom against the serialized workflow in private storage. I'm proposing that we now compare fingerprints of the serialized workflows. These may be fingerprints of v2alpha workflows or the new panel match internal workflow - depending on the concrete implementation of ApiClient.
With the removal of ExchangeStep, the exchange task validator now accepts a ApiClient.ClaimedExchangeStep.
This PR proposes a set of updates to decouple the panel match client libraries from the v2alpha API.
This is NOT intended to be merged as-is, but rather to prove the feasibility of decoupling and to gather some initial feedback on the overall approach. If there are no major concerns, I will split this into several smaller PRs and send those for separate review.
This PR touches a lot of files. The interesting bits are mostly in
src/main/kotlin/org/wfanet/panelmatch/client/launcher
if you just need to get the gist.Summary of changes:
ExchangeWorkflow
andExchangeStepAttempt
protobuf messages.ExchangeWorkflow
exclusively.--exchange-workflow-format
flag to be compatible with both the v2alpha messages and the new internal ones. Supported formats are:V2ALPHA
- For exchanges that continue to use the Kingdom-based protocol with v2alpha messages.KINGDOMLESS
- For exchanges that have adopted the upcoming Kingdom-less protocol with panel match internal messages.ApiClient.ClaimedExchangeStep
- Updated to remove references to v2alpha concepts. Notable changes:attemptKey
for a step is now a panel match internalExchangeStepAttemptKey
with mostly the same info as before but no references to a "resource name".ExchangeStep
message, instead ported the necessary fields directly intoClaimedExchangeStep
. These are:exchangeDate
,stepIndex
, andworkflow
.workflowFingerprint
. When a claimed exchange step is being validated, the existing logic compares the serialized workflow returned by the Kingdom against the serialized workflow in private storage. I'm proposing that we now compare fingerprints of the serialized workflows. These may be fingerprints of v2alpha workflows or the new panel match internal workflow - depending on the concrete implementation ofApiClient
.ExchangeStep
, the exchange task validator now accepts aApiClient.ClaimedExchangeStep
.