Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align client classes with the TSP specification #4

Merged
merged 3 commits into from
Oct 20, 2020

Conversation

tahini
Copy link
Contributor

@tahini tahini commented Aug 4, 2020

Fixes #3

Signed-off-by: Geneviève Bastien [email protected]

/**
* Indicate if the entry will have row data
*/
hasRowModel?: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update to generic name in TSP. I think it's hasData

@tahini
Copy link
Contributor Author

tahini commented Sep 28, 2020

It matches the master of the trace-server-protocol­ as of today. It will be a breaking change for the trace extension and will need a matching patch in the trace server. I'm working on it, once the builds are fixed there!

Copy link
Collaborator

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tahini, one question below. Also, we need to make sure that we will merge this when all related patches are ready.

const url = this.baseUrl + '/experiments/' + expUUID + '/outputs/timeGraph/' + outputID + '/tree';
return await RestClient.post<GenericResponse<EntryModel<M, H>>>(url, parameters);
return await RestClient.post<GenericResponse<EntryModel<TimeGraphEntry>>>(url, parameters);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tahini You are removing the generic types here and below. I'm not sure about the implications. Does it mean that the server has to send a TimeGraphEntry in the response and can't send something like (MyEntry extends TimeGraphEntry)? It would be more strict, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! It is my understanding from a protocol point of view that we should not send random fields that are not documented, but rather let the protocol provide a way to describe the potential arbitrary fields (like name, tooltip, datatype, description, etc), so that implementation can have one generic way to handle them. The consumers should not have to know about all the various entry types, so yeah, the server will have to send a TimeGraphEntry with extra fields described as labels. It would be more strict, but for a good cause I think.

That is the reason behind this issue here: eclipse-cdt-cloud/trace-server-protocol#35 Let me know what you think

tahini and others added 3 commits October 8, 2020 16:52
Fixes eclipse-cdt-cloud#3

The rest methods should not use generic types, as it would imply that
consumers of this client need to know about the details of each
potential sub-class, which is one thing we should avoid. Rather the
protocol should be self-descriptive to provide extra data in one
specific way.

Signed-off-by: Geneviève Bastien <[email protected]>
A few fields have been renamed.

Signed-off-by: Geneviève Bastien <[email protected]>
The composite directive prevented yarn build from building in the lib
directory.

Signed-off-by: Geneviève Bastien <[email protected]>
Copy link
Collaborator

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Works with corresponding patches in trace server and theia-trace-extension

@tahini
Copy link
Contributor Author

tahini commented Oct 16, 2020

Thanks for the review, I'll merge when all the components are ready to merge (the theia-trace-extension one will need to be updated once this is in to link to the new next version of this packages)

@tahini tahini merged commit 339f1e7 into eclipse-cdt-cloud:master Oct 20, 2020
@tahini tahini deleted the align_tsp branch October 20, 2020 12:17
@marcdumais-work marcdumais-work mentioned this pull request Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TimeGraphRow has field entryId that is filled as entryID
2 participants