yunfengzhou-hub commented on code in PR #1138:
URL: https://github.com/apache/flink-agents/pull/1138#discussion_r4217311510
##########
plan/src/main/java/org/apache/flink/agents/plan/serializer/ResourceProviderJsonSerializer.java:
##########
@@ -118,4 +122,14 @@ private void serializeJavaResourceProvider(JsonGenerator
gen, JavaResourceProvid
gen.writeStringField(
"__resource_provider_type__",
JavaResourceProvider.class.getSimpleName());
}
+
+ private void serializeInternalSubagentProvider(
+ JsonGenerator gen, InternalSubagentProvider provider) throws
IOException {
+ gen.writeStringField("name", provider.getName());
+ gen.writeStringField("type", provider.getType().getValue());
+ gen.writeStringField("scope", provider.getScope());
+ gen.writeObjectField("childPlan", provider.getChildPlan());
Review Comment:
Both sides fixed. Java adds the missing final `writeEndObject()` so the
provider type marker no longer leaks into `childPlan`; Python's deserializer
now converts `InternalSubagentProvider` into `InternalSubagentSetup`.
Round-trip coverage: `internalSubagentProviderSurvivesJsonRoundTrip`
(Java→Java), `javaPlanWithInternalSubagentSnapshotIsStable` (Java→snapshot),
and `test_python_can_deserialize_java_plan_with_internal_subagent`
(Java→Python).
--
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]