From be0443c436a45668bd5b1c8787490e4af842ee1e Mon Sep 17 00:00:00 2001 From: renjiez Date: Sun, 22 Sep 2024 21:52:26 +0000 Subject: [PATCH] fix: Add computation-control-service to internal-api-server's NetworkPolicy allow list. --- src/main/k8s/duchy.cue | 1 + .../measurement/duchy/service/internal/computations/Protos.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/k8s/duchy.cue b/src/main/k8s/duchy.cue index 1268131ff76..a7b64e589de 100644 --- a/src/main/k8s/duchy.cue +++ b/src/main/k8s/duchy.cue @@ -350,6 +350,7 @@ import ("strings") _object_prefix + "llv2-mill-app", _object_prefix + "hmss-mill-app", _object_prefix + "async-computation-control-server-app", + _object_prefix + "computation-control-server-app", _object_prefix + "requisition-fulfillment-server-app", _object_prefix + "computations-cleaner-app", ] diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/service/internal/computations/Protos.kt b/src/main/kotlin/org/wfanet/measurement/duchy/service/internal/computations/Protos.kt index 78da7a40fb4..fd124c2940a 100644 --- a/src/main/kotlin/org/wfanet/measurement/duchy/service/internal/computations/Protos.kt +++ b/src/main/kotlin/org/wfanet/measurement/duchy/service/internal/computations/Protos.kt @@ -79,6 +79,7 @@ fun ComputationToken.inputPathList(): List = /** Extract the [RoleInComputation] from a [ComputationToken]. */ fun ComputationToken.role(): RoleInComputation { + @Suppress("WHEN_ENUM_CAN_BE_NULL_IN_JAVA") // Proto enum fields are never null. return when (computationDetails.protocolCase) { ComputationDetails.ProtocolCase.LIQUID_LEGIONS_V2 -> computationDetails.liquidLegionsV2.role ComputationDetails.ProtocolCase.REACH_ONLY_LIQUID_LEGIONS_V2 ->