This is an automated email from the ASF dual-hosted git repository.

Yicong-Huang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git


The following commit(s) were added to refs/heads/main by this push:
     new 1497806fb7 fix: register OneToOnePartition in PartitionInfo 
@JsonSubTypes (#5033)
1497806fb7 is described below

commit 1497806fb71df895d4d73ab3bb996e950e0d2134
Author: Matthew B. <[email protected]>
AuthorDate: Tue May 12 19:26:36 2026 -0700

    fix: register OneToOnePartition in PartitionInfo @JsonSubTypes (#5033)
---
 .../texera/amber/core/workflow/PartitionInfo.scala |  1 +
 .../amber/core/workflow/PartitionInfoSpec.scala    | 22 ++--------------------
 2 files changed, 3 insertions(+), 20 deletions(-)

diff --git 
a/common/workflow-core/src/main/scala/org/apache/texera/amber/core/workflow/PartitionInfo.scala
 
b/common/workflow-core/src/main/scala/org/apache/texera/amber/core/workflow/PartitionInfo.scala
index 90210c7a9b..b5e6a02dab 100644
--- 
a/common/workflow-core/src/main/scala/org/apache/texera/amber/core/workflow/PartitionInfo.scala
+++ 
b/common/workflow-core/src/main/scala/org/apache/texera/amber/core/workflow/PartitionInfo.scala
@@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.{JsonSubTypes, 
JsonTypeInfo}
     new Type(value = classOf[HashPartition], name = "hash"),
     new Type(value = classOf[RangePartition], name = "range"),
     new Type(value = classOf[SinglePartition], name = "single"),
+    new Type(value = classOf[OneToOnePartition], name = "oneToOne"),
     new Type(value = classOf[BroadcastPartition], name = "broadcast"),
     new Type(value = classOf[UnknownPartition], name = "none")
   )
diff --git 
a/common/workflow-core/src/test/scala/org/apache/texera/amber/core/workflow/PartitionInfoSpec.scala
 
b/common/workflow-core/src/test/scala/org/apache/texera/amber/core/workflow/PartitionInfoSpec.scala
index 867c6b8e79..3a8240c378 100644
--- 
a/common/workflow-core/src/test/scala/org/apache/texera/amber/core/workflow/PartitionInfoSpec.scala
+++ 
b/common/workflow-core/src/test/scala/org/apache/texera/amber/core/workflow/PartitionInfoSpec.scala
@@ -171,12 +171,7 @@ class PartitionInfoSpec extends AnyFlatSpec {
   // 
---------------------------------------------------------------------------
 
   "PartitionInfo @JsonSubTypes" should
-    "list the current registration set (omits OneToOnePartition)" in {
-    // Pin: the @JsonSubTypes annotation on PartitionInfo currently registers
-    // HashPartition, RangePartition, SinglePartition, BroadcastPartition,
-    // and UnknownPartition — but NOT OneToOnePartition. The "all" claim is
-    // documented separately in the pendingUntilFixed test below so this
-    // spec only documents the present-day set.
+    "register every concrete PartitionInfo subclass" in {
     val annotation = 
classOf[PartitionInfo].getAnnotation(classOf[JsonSubTypes])
     val registered = 
annotation.value().toList.map(_.value().getSimpleName).toSet
     assert(
@@ -184,26 +179,13 @@ class PartitionInfoSpec extends AnyFlatSpec {
         "HashPartition",
         "RangePartition",
         "SinglePartition",
+        "OneToOnePartition",
         "BroadcastPartition",
         "UnknownPartition"
       )
     )
   }
 
-  it should "eventually register every concrete PartitionInfo subclass 
(pendingUntilFixed)" in pendingUntilFixed {
-    // Intended contract: every concrete PartitionInfo subtype must be
-    // reachable through the polymorphic dispatch on `type`, otherwise
-    // Jackson cannot deserialize the missing payload (today: OneToOne-
-    // Partition). Asserting `contains "OneToOnePartition"` here flips
-    // this test from Pending to a real pass once the bug is fixed —
-    // pendingUntilFixed inverts that and turns the now-passing
-    // assertion into a failure so the fix has to delete the marker
-    // deliberately.
-    val annotation = 
classOf[PartitionInfo].getAnnotation(classOf[JsonSubTypes])
-    val registered = 
annotation.value().toList.map(_.value().getSimpleName).toSet
-    assert(registered.contains("OneToOnePartition"))
-  }
-
   // 
---------------------------------------------------------------------------
   // case-class equality
   // 
---------------------------------------------------------------------------

Reply via email to