goutamadwant opened a new pull request, #12466:
URL: https://github.com/apache/seatunnel/pull/12466
### Purpose of this pull request
Refs #11735.
`TaskExecutionState` and `TaskDeployState` are Java-serialized between
workers and the master (`NotifyTaskStatusOperation` and the
`DeployTaskOperation` response). Neither declares a `serialVersionUID`, so
adding a field later would change the generated value and break a mixed-version
cluster.
This PR declares the values the JVM generates today, so the wire form does
not change:
- `TaskExecutionState`: `-108652017022658969L`
- `TaskDeployState`: `2646079648150626562L`
It also adds `TaskStateSerializationTest`, with fixtures written by the
unmodified classes on current `dev`. The fixture bytes were identical on JDK 8
and JDK 11. The test checks that:
- the fixtures deserialize with the pinned classes;
- the pinned classes write exactly the fixture bytes;
- the declared UIDs equal the previously generated values.
No field is added here. This is the first slice discussed in STIP-33, before
any optional failure-history field is introduced.
### Does this PR introduce _any_ user-facing change?
No. The declared values equal the previously generated ones, and the test
asserts that the serialized bytes are unchanged.
### How was this patch tested?
- Fixtures generated from the unmodified classes with JDK 1.8.0_504 and JDK
11.0.32; the bytes were identical.
- `TaskStateSerializationTest` passes on JDK 8 and JDK 11:
```shell
./mvnw -pl seatunnel-engine/seatunnel-engine-server -am
-Dtest=TaskStateSerializationTest -Dsurefire.failIfNoSpecifiedTests=false
package
```
- As a negative check, changing either declared value locally makes the
fixture-read, byte-equality and UID assertions fail.
### Check list
* [ ] If any new Jar binary package adding in your PR, please add License
Notice according
[New License
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
* [ ] If necessary, please update the documentation to describe the new
feature. https://github.com/apache/seatunnel/tree/dev/docs
* [ ] If necessary, please update `incompatible-changes.md` to describe the
incompatibility caused by this PR.
* [ ] If you are contributing the connector code, please check that the
following files are updated:
1. Update
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
and add new connector information in it
2. Update the pom file of
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
3. Add ci label in
[label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
4. Add e2e testcase in
[seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
5. Update connector
[plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
--
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]