Repository navigation
[chore]: Replaced Hand-written DTOs with Protobuff - #241
Conversation
SuvabrataChowdhury
left a comment
There was a problem hiding this comment.
A lot of unnecessary formating changes has been sent. please check that. Also refer to how the openapi doc is used. that is also using similer concept of autogenerated thing. we can keep the .proto files under /apis/protobuff so that every service has a unified location.
SuvabrataChowdhury
left a comment
There was a problem hiding this comment.
Mostly looks good. one ask is just keep the .proto files itself under root of autobuild just like /apis/openapi-spec/ keeps openapi specifications under unified path. This helps in keeping all such definition easily sharable amongst multiple services.
There was a problem hiding this comment.
Mostly looks good to me. One ask is to include a little bit of documentation around it. Like if you used any extensions for syntax highlighting, docs you referred etc, so that anyone who needs to develop later, they can read and have a better understanding.
Also one more thing is that which maven build stage does the generation of these files come? is it compilation?
One more thing, please add the gen package in .gitignore to prevent manual edits of the generated files.
Documents added. The files are generated in the Updated .gitignore |
SuvabrataChowdhury
left a comment
There was a problem hiding this comment.
Little modifications on the wordings.
Also please take the latest pull and resolve the merge conflicts.
74c8195 to
9411321
Compare
SuvabrataChowdhury
left a comment
There was a problem hiding this comment.
LGTM. Please create a new issue so that we can use the conventional openapi specs. This will help in onboarding any new service as those won't have to implement additional unnecessary transformation logic.
Sam007Yeah
left a comment
There was a problem hiding this comment.
Everything looks good changes wise.
Major issue is the communication with the client. After testing there seems to be some problems.
- I think you need to test it once from your side and observe what's happening. THe generated openAPI spec based on the generated DTO has some problems. the UI doesn't get the requested data through the API's and results in 500 errors throughout.
{
"type": "about:blank",
"title": "Internal Server Error",
"status": 500,
"detail": "Direct self-reference leading to cycle (through reference chain: java.util.ImmutableCollections$ListN[0]->com.autobuild.pipeline.definiton.gen.dto.Pipeline[\"unknownFields\"]->com.google.protobuf.UnknownFieldSet[\"defaultInstanceForType\"])",
"instance": "/api/v1/pipeline"
}- Even though the database saves these changes we can't see them on the UI becuase of the same issue.
Let's have a round of testing with the client once, labelling this as DO_NOT_MERGE for now till we find a solution
yess.. looking into it |
Sam007Yeah
left a comment
There was a problem hiding this comment.
LGTM, @SuvabrataChowdhury will also check and see, we're almost done I guess
SuvabrataChowdhury
left a comment
There was a problem hiding this comment.
I tested it out. It's working fine. Some suggestions.
- Can we keep the existing DTOs and Mappers? We need to unify the service structure and as this service exposes itself to UI through REST, we definitely at the edge of this service where the existing DTOs and Mappers will be required.
- Please Raise an Issue for future reference regarding clean contracts.
This reverts commit 4b0857a.
3c02cb2 to
4454403
Compare
Done. #268 |
SUMMARY
Issue Link
Changes Summary
Testing Done
Pull Request Checklist
Additional Comments