sdk-java icon indicating copy to clipboard operation
sdk-java copied to clipboard

Make classes serializable

Open visheshruparelia opened this issue 1 year ago • 6 comments

What this PR does / why we need it: There were some manually created POJOs which did not implement serializable interface. Making those implement Serializable interface here. This will enable Workflow objects transferrable over wire.

visheshruparelia avatar Oct 26 '23 13:10 visheshruparelia

@ricardozanini just curious: I saw most of the classes are generated automatically from the JsonSchema but some of them are manually created. These manually created ones did not implement Serializable interface. I wonder why did we create these classes manually?

visheshruparelia avatar Oct 26 '23 13:10 visheshruparelia

I have tested this branch (synced with latest main branch) on my local there is no regression and also my usecase is now working after this. Quick question: Are there any other classes which were manually written apart from the ones present in this package? In that case we will have to make those classes implement serializable too. NOTE: I am only worried about the classes being used inside the main Workflow class other Util classes are fine.

visheshruparelia avatar Oct 26 '23 13:10 visheshruparelia

Quick question: Are there any other classes which were manually written apart from the ones present in this package? In that case we will have to make those classes implement serializable too.

The manually created classes are needed in order to implement a custom behavior that the generated ones cannot.

I'd recommend reviewing the whole project and writing more throughout tests using coverage to make sure everything is set before we merge this one. Can you do it?

ricardozanini avatar Oct 26 '23 13:10 ricardozanini

Sure. As of now I am using a workaround to solve my usecase so not a blocker for me. It will take some time for me though.

Just a thought: How do you propose testing this in UTs?

visheshruparelia avatar Oct 26 '23 13:10 visheshruparelia

Another option is we merge this and I work on a follow up PR which does a comprehensive check as this PR alone seems harmless to me does not cause any regression. Upto you...

visheshruparelia avatar Oct 26 '23 13:10 visheshruparelia

I'd rather everything in one PR if you don't mind since I have to cherry pick to another branch to do a fup release.

ricardozanini avatar Oct 26 '23 14:10 ricardozanini

@visheshruparelia I'm merging this one to help with your use case, sorry for the late merging. We will release a new major version targeting Java 11, so you can go from there.

ricardozanini avatar May 27 '24 15:05 ricardozanini