Matthew-DWM commented on code in PR #9364: URL: https://github.com/apache/texera/pull/9364#discussion_r4555869055
########## amber/src/test/integration/org/apache/texera/amber/engine/e2e/PythonWorkerFailureIntegrationSpec.scala: ########## @@ -0,0 +1,192 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.texera.amber.engine.e2e + +import com.twitter.util.Duration +import org.apache.commons.lang3.SystemUtils +import org.apache.pekko.actor.{ActorSystem, Props} +import org.apache.pekko.testkit.{ImplicitSender, TestKit} +import org.apache.texera.amber.clustering.SingleNodeListener +import org.apache.texera.amber.core.workflow.PortIdentity +import org.apache.texera.amber.engine.common.AmberRuntime +import org.apache.texera.amber.engine.e2e.TestUtils.{ + buildWorkflow, + cleanupWorkflowExecutionData, + initiateTexeraDBForTestCases, + runWorkflowAndReadResults, + setUpWorkflowExecutionData +} +import org.apache.texera.amber.operator.TestOperators +import org.apache.texera.amber.tags.IntegrationTest +import org.apache.texera.common.compiler.model.LogicalLink +import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach} +import org.scalatest.flatspec.AnyFlatSpecLike + +import java.nio.charset.StandardCharsets +import java.nio.file.{Files, Path} +import java.util.Base64 +import java.util.concurrent.atomic.AtomicLong +import scala.jdk.CollectionConverters._ +import scala.util.{Failure, Success, Try} + +/** + * End-to-end: when the operating system kills a running Python worker's process (the + * out-of-memory killer, for example), the execution must fail promptly and say which worker + * died and how, instead of staying RUNNING forever with nothing reported. + * + * The workflow is CSV (20,000 rows) -> Python UDF (1 ms per row) -> Keyword Search, which runs + * for tens of seconds, so the kill lands mid-run. Only this run's UDF process is killed: it is + * picked out by the operator id in its startup configuration. + * + * Tagged @IntegrationTest because it spawns a real Python worker; routed to the + * `amber-integration` CI job. + */ +@IntegrationTest +class PythonWorkerFailureIntegrationSpec Review Comment: Done: dropped. The new early-exit test runs the worker under the real `Coordinator` and checks the failure's worker attribution, so the supervisor path is still covered. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
