Remove job context.#2373
Conversation
d9daa4e to
dbbec0c
Compare
Codecov Report
@@ Coverage Diff @@
## main #2373 +/- ##
============================================
+ Coverage 77.11% 83.61% +6.49%
+ Complexity 1234 1214 -20
============================================
Files 228 231 +3
Lines 5572 5522 -50
Branches 447 266 -181
============================================
+ Hits 4297 4617 +320
+ Misses 775 762 -13
+ Partials 500 143 -357
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
| """ | ||
| SELECT | ||
| run_uuid, | ||
| JSON_AGG(event -> 'run' -> 'facets' ORDER BY event_time) AS facets |
There was a problem hiding this comment.
if we were able to merge #2355 before, it would be great to make use of run_facets_view.
|
|
||
| @EqualsAndHashCode | ||
| @ToString | ||
| public final class Facets { |
There was a problem hiding this comment.
If it is run related, then consider calling it RunFacets.
| @@ -0,0 +1,3 @@ | |||
| /* SPDX-License-Identifier: Apache-2.0 */ | |||
|
|
|||
| ALTER TABLE job_versions DROP COLUMN job_context_uuid; | |||
There was a problem hiding this comment.
Let's drop column in the next version - this would prevent rollback if the feature would be buggy.
wslulciuc
left a comment
There was a problem hiding this comment.
@JDarDagran I think adding an endpoint for obtaining facets for a given run ID is a great addition to the Marquez API, but can we introduce the endpoint in a separate PR (to limit scope)? I've also provided some feedback on the runs facet endpoint.
| @ExceptionMetered | ||
| @GET | ||
| @Produces(APPLICATION_JSON) | ||
| @Path("/run/{id}") |
There was a problem hiding this comment.
I would add the endpoint to obtain facets for a given run to RunResource. That is, to receive a run, we have the endpoint:
GET /api/v1/jobs/runs/{id}
Similarly, to obtain facets for a given run, I would follow the same pattern:
GET /api/v1/jobs/runs/{id}/facets
@wslulciuc Normally I would agree. However, if we don't add job facet endpoint in this PR we have no viable source of data to replace job context with. The closest one would be
I do agree with your feedback on run facets endpoint, will apply to it. |
|
Also I am getting error on Graph view - "Something went wrong while fetching job facets". Maybe I don't have some data? |
6e51401 to
2742344
Compare
pawel-big-lebowski
left a comment
There was a problem hiding this comment.
I cannot speak for webbev part, but the backend part seems good to me.
I've included some minor comments.
I think Java client is missing Run/Job facets added in service package, however this can be added later on in separate PR as this one already got pretty big.
🚀 👍 💯
83304d4 to
3f7ce31
Compare
Signed-off-by: Jakub Dardzinski <kuba0221@gmail.com> Add call to API in frontend. Add tests. Signed-off-by: Jakub Dardzinski <kuba0221@gmail.com> Update javadocs. Signed-off-by: Jakub Dardzinski <kuba0221@gmail.com> Apply spotless fixes. Signed-off-by: Jakub Dardzinski <kuba0221@gmail.com> Remove FacetResource. Split react functions to each component. Signed-off-by: Jakub Dardzinski <kuba0221@gmail.com> Add more tests for JobResource. Update OpenAPI spec. Signed-off-by: Jakub Dardzinski <kuba0221@gmail.com> Add more tests. Signed-off-by: Jakub Dardzinski <kuba0221@gmail.com> Add lombok option to skip coverage check on NonNull. Signed-off-by: Jakub Dardzinski <kuba0221@gmail.com> Move find facets methods to corresponding daos. Signed-off-by: Jakub Dardzinski <kuba0221@gmail.com>
3f7ce31 to
95c00c8
Compare
wslulciuc
left a comment
There was a problem hiding this comment.
Thanks for the clean up @JDarDagran! 🥇 💯 🚀
Add call to API in frontend. Add tests. Update javadocs. Apply spotless fixes. Remove FacetResource. Split react functions to each component. Add more tests for JobResource. Update OpenAPI spec. Add more tests. Add lombok option to skip coverage check on NonNull. Move find facets methods to corresponding daos. Signed-off-by: Jakub Dardzinski <kuba0221@gmail.com> Co-authored-by: Willy Lulciuc <willy@datakin.com>
Signed-off-by: Jakub Dardzinski kuba0221@gmail.com
Add call to API in frontend.
Add tests.
Signed-off-by: Jakub Dardzinski kuba0221@gmail.com
Problem
Closes: #2230
Solution
This PR removes use of job context. It also adds 2 endpoints for job/run facets per run. Those are called from web components to replace job context with
SQLJobFacet.There is also a lot of code removal. It appears that plenty of code was marked as uncovered due to
@NonNullannotation and caused issues to achieve code coverage goal. According to lombok docs I've addedlombok.nonNull.exceptionType=JDKto skip coverage checks on those annotations.Checklist
CHANGELOG.mdwith details about your change under the "Unreleased" section (if relevant, depending on the change, this may not be necessary).sqldatabase schema migration according to Flyway's naming convention (if relevant)