apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.08k stars 8.72k forks source link

Support old version state machine designer artifacts #6137

Open ptyin opened 6 months ago

ptyin commented 6 months ago

Why you need it?

New version state machine designer uses JSON with style information that is great similar to the user-written JSON. However, the JSON file that old version (i.e., the one implemented in GGEditor) is in a very different form. The new version should be backward-compatible.

How it could be?

Extend SagaImporter to be backward-compatible.

Other related information

Please merge related PR to the refactor_designer branch.

elysium-w commented 1 month ago

@ptyin I would like to work on this issue. Could you please assign it to me?

ptyin commented 1 month ago

@ptyin I would like to work on this issue. Could you please assign it to me?

Sure. You can first shed some lights on it (how would you like to design and test), and then work on implementation.

elysium-w commented 3 weeks ago

@ptyin I would like to work on this issue. Could you please assign it to me?

Sure. You can first shed some lights on it (how would you like to design and test), and then work on implementation.

My idea might be simpler. Add a converter function that checks whether the JSON is in the old version format. If so, convert it to the new version format. And I want to know,how many versions before?Which version of Seata uses the old JSON format?

ptyin commented 3 weeks ago

@ptyin I would like to work on this issue. Could you please assign it to me?

Sure. You can first shed some lights on it (how would you like to design and test), and then work on implementation.

My idea might be simpler. Add a converter function that checks whether the JSON is in the old version format. If so, convert it to the new version format. And I want to know,how many versions before?Which version of Seata uses the old JSON format?

There is a breaking change on the designer introduced by the following PR,

The old JSON format indicates the one before this PR. So what you should concern about is the one. You can checkout the 2.0.0 branch to see the older version,

https://github.com/apache/incubator-seata/tree/2.0.0/saga/seata-saga-statemachine-designer