The org.apache.texera.amber.util.serde package contains three small Jackson / VFS-URI serde helpers, none of which is unit-tested:
| File |
Role |
GlobalPortIdentitySerde.scala |
Custom string format (logicalOpId=…,layerName=…,portId=…,isInternal=…,isInput=…) used by VFS URIs to embed a GlobalPortIdentity without underscores (which would clash with the VFS URI parser). |
PortIdentityKeySerializer.scala |
Jackson JsonSerializer for PortIdentity map keys; also exposes portIdToString(PortIdentity) as \"id_internal\". |
PortIdentityKeyDeserializer.scala |
Jackson KeyDeserializer paired with the serializer. |
Each is referenced by load-bearing code (VFSURIFactory, JSONUtils.objectMapper setup, WorkflowExecutionsResource), so a typo in any of these strings would silently misroute deserialized state.
Coverage to add
GlobalPortIdentitySerde.serializeAsString / deserializeFromString round-trip for representative inputs (positive); IllegalArgumentException on a malformed string and on individual missing/garbled fields (negative).
PortIdentityKeySerializer.portIdToString exact format pin (\"id_internal\"); and the Jackson serializer wired into a real ObjectMapper round-tripping a Map[PortIdentity, V] (key-serialize → key-deserialize equals identity).
PortIdentityKeyDeserializer.deserializeKey happy-path + bad-input behavior (e.g., underscore missing, internal flag not boolean).
Priority
P3 - Low
Task Type
The
org.apache.texera.amber.util.serdepackage contains three small Jackson / VFS-URI serde helpers, none of which is unit-tested:GlobalPortIdentitySerde.scala(logicalOpId=…,layerName=…,portId=…,isInternal=…,isInput=…)used by VFS URIs to embed aGlobalPortIdentitywithout underscores (which would clash with the VFS URI parser).PortIdentityKeySerializer.scalaJsonSerializerforPortIdentitymap keys; also exposesportIdToString(PortIdentity)as\"id_internal\".PortIdentityKeyDeserializer.scalaKeyDeserializerpaired with the serializer.Each is referenced by load-bearing code (
VFSURIFactory,JSONUtils.objectMappersetup,WorkflowExecutionsResource), so a typo in any of these strings would silently misroute deserialized state.Coverage to add
GlobalPortIdentitySerde.serializeAsString/deserializeFromStringround-trip for representative inputs (positive);IllegalArgumentExceptionon a malformed string and on individual missing/garbled fields (negative).PortIdentityKeySerializer.portIdToStringexact format pin (\"id_internal\"); and the Jackson serializer wired into a realObjectMapperround-tripping aMap[PortIdentity, V](key-serialize → key-deserialize equals identity).PortIdentityKeyDeserializer.deserializeKeyhappy-path + bad-input behavior (e.g., underscore missing, internal flag not boolean).Priority
P3 - Low
Task Type