-
Notifications
You must be signed in to change notification settings - Fork 323
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
Remove job context. #2373
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we were able to merge #2355 before, it would be great to make use of run_facets_view
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JDarDagran we were able to ;)
|
||
@EqualsAndHashCode | ||
@ToString | ||
public final class Facets { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's drop column in the next version - this would prevent rollback if the feature would be buggy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clean up @JDarDagran! 🥇 💯 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice :)
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
@NonNull
annotation and caused issues to achieve code coverage goal. According to lombok docs I've addedlombok.nonNull.exceptionType=JDK
to skip coverage checks on those annotations.Checklist
CHANGELOG.md
with details about your change under the "Unreleased" section (if relevant, depending on the change, this may not be necessary).sql
database schema migration according to Flyway's naming convention (if relevant)