@Test public void shouldPropagateLaunchPlanToStub() { WorkflowIdentifier wfIdentifier = WorkflowIdentifier.builder() .domain(DOMAIN) .project(PROJECT) .name(WF_NAME) .version(WF_VERSION) .build(); client.createLaunchPlan(LP_IDENTIFIER, wfIdentifier); assertThat( stubService.createLaunchPlanRequest, equalTo( LaunchPlanOuterClass.LaunchPlanCreateRequest.newBuilder() .setId(newIdentifier(ResourceType.LAUNCH_PLAN, LP_NAME, LP_VERSION)) .setSpec( LaunchPlanOuterClass.LaunchPlanSpec.newBuilder() .setWorkflowId(newIdentifier(ResourceType.WORKFLOW, WF_NAME, WF_VERSION)) .build()) .build())); }
void createLaunchPlan(LaunchPlanIdentifier id, WorkflowIdentifier workflowId) { LOG.debug("createLaunchPlan {}", id); LaunchPlanOuterClass.LaunchPlanCreateResponse response = stub.createLaunchPlan( LaunchPlanOuterClass.LaunchPlanCreateRequest.newBuilder() .setId(ProtoUtil.serialize(id)) .setSpec( LaunchPlanOuterClass.LaunchPlanSpec.newBuilder() .setWorkflowId(ProtoUtil.serialize(workflowId)) .build()) .build()); verifyNotNull(response, "Unexpected null response when creating launch plan: %s", id); }
FlyteAdminClient implements AutoCloseable { void createLaunchPlan(LaunchPlanIdentifier id, WorkflowIdentifier workflowId) { LOG.debug("createLaunchPlan {}", id); LaunchPlanOuterClass.LaunchPlanCreateResponse response = stub.createLaunchPlan( LaunchPlanOuterClass.LaunchPlanCreateRequest.newBuilder() .setId(ProtoUtil.serialize(id)) .setSpec( LaunchPlanOuterClass.LaunchPlanSpec.newBuilder() .setWorkflowId(ProtoUtil.serialize(workflowId)) .build()) .build()); verifyNotNull(response, "Unexpected null response when creating launch plan: %s", id); } }
FlyteAdminClient implements AutoCloseable { void createLaunchPlan(LaunchPlanIdentifier id, WorkflowIdentifier workflowId) { LOG.debug("createLaunchPlan {}", id); LaunchPlanOuterClass.LaunchPlanCreateResponse response = stub.createLaunchPlan( LaunchPlanOuterClass.LaunchPlanCreateRequest.newBuilder() .setId(ProtoUtil.serialize(id)) .setSpec( LaunchPlanOuterClass.LaunchPlanSpec.newBuilder() .setWorkflowId(ProtoUtil.serialize(workflowId)) .build()) .build()); verifyNotNull(response, "Unexpected null response when creating launch plan: %s", id); } @VisibleForTesting  FlyteAdminClient(AdminServiceGrpc.AdminServiceBlockingStub stub, ManagedChannel channel); }
FlyteAdminClient implements AutoCloseable { void createLaunchPlan(LaunchPlanIdentifier id, WorkflowIdentifier workflowId) { LOG.debug("createLaunchPlan {}", id); LaunchPlanOuterClass.LaunchPlanCreateResponse response = stub.createLaunchPlan( LaunchPlanOuterClass.LaunchPlanCreateRequest.newBuilder() .setId(ProtoUtil.serialize(id)) .setSpec( LaunchPlanOuterClass.LaunchPlanSpec.newBuilder() .setWorkflowId(ProtoUtil.serialize(workflowId)) .build()) .build()); verifyNotNull(response, "Unexpected null response when creating launch plan: %s", id); } @VisibleForTesting  FlyteAdminClient(AdminServiceGrpc.AdminServiceBlockingStub stub, ManagedChannel channel); @Override void close(); }
FlyteAdminClient implements AutoCloseable { void createLaunchPlan(LaunchPlanIdentifier id, WorkflowIdentifier workflowId) { LOG.debug("createLaunchPlan {}", id); LaunchPlanOuterClass.LaunchPlanCreateResponse response = stub.createLaunchPlan( LaunchPlanOuterClass.LaunchPlanCreateRequest.newBuilder() .setId(ProtoUtil.serialize(id)) .setSpec( LaunchPlanOuterClass.LaunchPlanSpec.newBuilder() .setWorkflowId(ProtoUtil.serialize(workflowId)) .build()) .build()); verifyNotNull(response, "Unexpected null response when creating launch plan: %s", id); } @VisibleForTesting  FlyteAdminClient(AdminServiceGrpc.AdminServiceBlockingStub stub, ManagedChannel channel); @Override void close();  }