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

control-service: Add Data Job Executions to the graphql #265

Merged
merged 2 commits into from
Sep 27, 2021

Conversation

kostoww
Copy link
Contributor

@kostoww kostoww commented Sep 20, 2021

Why:
Job executions are important part of the data jobs details. They could be easily attached to the existing graphql endpoint in order to extend the capabilities for the consumers.

What is done:
This implementation is providing the ability for the users to attach executions details to each data job in graphql result list, by providing functionality to sort and page the results by native graphql query: eg. specifying execution field in GraphQL request and provide arguments, eg: executions(pageNumber: 1, pageSize: 5, filter: [...]) nested in the main jobs query. There are few limitation that are introduced:

Executions page limitation are the same as the parent query: currently (1 <= pageSize <= 100) and (1 <= pageNumber)
Execution page currently cannot be seen (like in the jobs list) cause its nested object field
Execution uses filtering object (same as parent query), but could not use filtering, only sorting (validated with check).

Filtering will require using Spring Data Specification API (in order not to load all data jobs for each job) and merge it with current GraphQL strategy field pattern

Testing:
Local run of tests and manual testing, also added some new test cases in unit tests and some code change in Integration tests.

(ref: #120)

Signed-off-by: Plamen Kostov [email protected]

@kostoww kostoww requested a review from mivanov1988 September 20, 2021 19:18
@kostoww kostoww force-pushed the person/kostoww/implement-executions-in-graphql branch from 6a2ec3d to e52d127 Compare September 20, 2021 19:57
@antoniivanov
Copy link
Collaborator

Looks pretty good to me . My comments are mostly minor things like fixing the documentation and making sure we've tested at good level.

@mivanov1988
Copy link
Collaborator

Thanks for doing this change!

@mivanov1988
Copy link
Collaborator

In order to validate if the API works you can put a new test in DataJobTerminationStatusIT.checkDataJobExecutionStatus.

Testing:
Local run of tests and manual testing, also added some new test cases in unit tests and some code change in Integration tests

Signed-off-by: Plamen Kostov <[email protected]>
@kostoww kostoww force-pushed the person/kostoww/implement-executions-in-graphql branch from e52d127 to fe23af0 Compare September 26, 2021 19:08
@kostoww kostoww enabled auto-merge (squash) September 27, 2021 15:22
@kostoww kostoww disabled auto-merge September 27, 2021 15:24
@kostoww kostoww enabled auto-merge (squash) September 27, 2021 15:25
@kostoww kostoww merged commit a79362f into main Sep 27, 2021
@kostoww kostoww deleted the person/kostoww/implement-executions-in-graphql branch September 27, 2021 15:37
tpalashki pushed a commit that referenced this pull request Sep 29, 2021
Testing:
Local run of tests and manual testing, also added some new test cases in unit tests and some code change in Integration tests

Signed-off-by: Plamen Kostov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants