This is an automated email from the ASF dual-hosted git repository. github-merge-queue[bot] pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/texera.git
commit c49c9c3007d04fd6e6309aed675155d5f302ab7f Author: Xinyuan Lin <[email protected]> AuthorDate: Fri Sep 25 04:11:18 2026 +0000 chore(amber): remove the unused EditingTimeCompilationRequest (#8397) ### What changes were proposed in this PR? Deletes `EditingTimeCompilationRequest`, a websocket request the frontend no longer sends and the backend no longer handles. Pure deletion, no behaviour change: **−39 lines** across the case class, its `@JsonSubTypes` registration, the protocol spec's entries, and the frontend type-map entry. ### History | | | | --- | --- | | **Introduced by** | #2195 (2023-11-09) — "Enhance frontend error reporting", which had the editor send the logical plan over the websocket to collect static errors | | **Usage removed by** | #3178 (2024-12-29) — "Remove cache checker in logical plan" deleted the handler that took it, when compilation moved to the HTTP `workflow-compiling-service` | Dead for about a year and a half, with no sender and no handler since. The frontend documents the switch itself, in `workflow-compiling.service.ts`: > receive static errors (previously done by sending `EditingTimeCompilationRequest` and saving in the `ExecutionStateInfo`) > Reviewer note: that comment is **kept** — it is accurate history explaining why the service works the way it does, and it is the only remaining mention of the name. The shared `emptyPlanFields` test fixture also stays: `WorkflowExecuteRequest`'s `logicalPlan` still uses it. Its doc comment and the spec's list of registered type ids are updated to match. ### Any related issues, documentation, discussions? Closes #8394 ### How was this PR tested? Existing tests only — this PR adds none; it narrows the protocol spec to the types that remain registered. Locally, from the repo root with Java 17: - `sbt "WorkflowExecutionService/Test/compile"` — success. - `sbt "WorkflowExecutionService/testOnly *TexeraWebSocketRequestSpec"` — 12 tests, all pass. - `sbt scalafmtCheckAll "scalafixAll --check"` — clean. From `frontend/`: - `yarn --cwd frontend format:ci` — clean (this PR touches a `.ts` file). Verification, re-runnable by a reviewer: ``` git grep -n EditingTimeCompilationRequest # only the historical comment remains ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5) --- .../request/EditingTimeCompilationRequest.scala | 35 ---------------------- .../websocket/request/TexeraWebSocketRequest.scala | 1 - .../request/TexeraWebSocketRequestSpec.scala | 6 ++-- .../types/workflow-websocket.interface.ts | 1 - 4 files changed, 2 insertions(+), 41 deletions(-) diff --git a/amber/src/main/scala/org/apache/texera/web/model/websocket/request/EditingTimeCompilationRequest.scala b/amber/src/main/scala/org/apache/texera/web/model/websocket/request/EditingTimeCompilationRequest.scala deleted file mode 100644 index f7a585bb15..0000000000 --- a/amber/src/main/scala/org/apache/texera/web/model/websocket/request/EditingTimeCompilationRequest.scala +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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.web.model.websocket.request - -import org.apache.texera.amber.operator.LogicalOp -import org.apache.texera.common.compiler.model.{LogicalLink, LogicalPlanPojo} - -case class EditingTimeCompilationRequest( - operators: List[LogicalOp], - links: List[LogicalLink], - opsToViewResult: List[String], - opsToReuseResult: List[String] -) extends TexeraWebSocketRequest { - - def toLogicalPlanPojo: LogicalPlanPojo = { - LogicalPlanPojo(operators, links, opsToViewResult, opsToReuseResult) - } -} diff --git a/amber/src/main/scala/org/apache/texera/web/model/websocket/request/TexeraWebSocketRequest.scala b/amber/src/main/scala/org/apache/texera/web/model/websocket/request/TexeraWebSocketRequest.scala index 1a92514ff9..a6153cad5e 100644 --- a/amber/src/main/scala/org/apache/texera/web/model/websocket/request/TexeraWebSocketRequest.scala +++ b/amber/src/main/scala/org/apache/texera/web/model/websocket/request/TexeraWebSocketRequest.scala @@ -29,7 +29,6 @@ import org.apache.texera.web.model.websocket.request.python.{ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonSubTypes( Array( - new Type(value = classOf[EditingTimeCompilationRequest]), new Type(value = classOf[HeartBeatRequest]), new Type(value = classOf[ModifyLogicRequest]), new Type(value = classOf[ResultPaginationRequest]), diff --git a/amber/src/test/scala/org/apache/texera/web/model/websocket/request/TexeraWebSocketRequestSpec.scala b/amber/src/test/scala/org/apache/texera/web/model/websocket/request/TexeraWebSocketRequestSpec.scala index fc8199a0dd..4fd67f7a24 100644 --- a/amber/src/test/scala/org/apache/texera/web/model/websocket/request/TexeraWebSocketRequestSpec.scala +++ b/amber/src/test/scala/org/apache/texera/web/model/websocket/request/TexeraWebSocketRequestSpec.scala @@ -52,7 +52,7 @@ import org.scalatest.matchers.should.Matchers * 1. key is the 'type' string, it must be the same as corresponding backend class name * 2. value is the payload this request/event needs" * - * The keys of `TexeraWebsocketRequestTypeMap` there are `EditingTimeCompilationRequest`, + * The keys of `TexeraWebsocketRequestTypeMap` there are * `HeartBeatRequest`, `ModifyLogicRequest`, `ResultExportRequest`, * `ResultPaginationRequest`, `RetryRequest`, `SkipTupleRequest`, * `WorkflowExecuteRequest`, `WorkflowKillRequest`, `WorkflowPauseRequest`, @@ -77,7 +77,7 @@ class TexeraWebSocketRequestSpec extends AnyFlatSpec with Matchers { private def frame(typeId: String, fields: String): String = if (fields.isEmpty) s"""{"type":"$typeId"}""" else s"""{"type":"$typeId",$fields}""" - // A LogicalPlanPojo / EditingTimeCompilationRequest payload with all four lists empty. + // A LogicalPlanPojo payload with all four lists empty. private val emptyPlanFields = """"operators":[],"links":[],"opsToViewResult":[],"opsToReuseResult":[]""" @@ -107,7 +107,6 @@ class TexeraWebSocketRequestSpec extends AnyFlatSpec with Matchers { */ private val registeredRequests: List[(String, String, Class[_ <: TexeraWebSocketRequest])] = List( - ("EditingTimeCompilationRequest", emptyPlanFields, classOf[EditingTimeCompilationRequest]), ("HeartBeatRequest", "", classOf[HeartBeatRequest]), ("ModifyLogicRequest", s""""operator":$limitOpJson""", classOf[ModifyLogicRequest]), ( @@ -144,7 +143,6 @@ class TexeraWebSocketRequestSpec extends AnyFlatSpec with Matchers { // (web/model/http/request/result/, served by WorkflowExecutionsResource) and not a // TexeraWebSocketRequest subtype at all — see the divergence test below. private val expectedTypeIds: Set[String] = Set( - "EditingTimeCompilationRequest", "HeartBeatRequest", "ModifyLogicRequest", "ResultPaginationRequest", diff --git a/frontend/src/app/workspace/types/workflow-websocket.interface.ts b/frontend/src/app/workspace/types/workflow-websocket.interface.ts index 475a9a2734..c89594e7a8 100644 --- a/frontend/src/app/workspace/types/workflow-websocket.interface.ts +++ b/frontend/src/app/workspace/types/workflow-websocket.interface.ts @@ -195,7 +195,6 @@ export type WorkflowStateInfo = Readonly<{ }>; export type TexeraWebsocketRequestTypeMap = { - EditingTimeCompilationRequest: LogicalPlan; HeartBeatRequest: {}; ModifyLogicRequest: ModifyOperatorLogic; ResultExportRequest: ResultExportRequest;
