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

Null pointer error on job event for static lineage #2974

Merged
merged 3 commits into from
Dec 13, 2024

Conversation

davidsharp7
Copy link
Member

@davidsharp7 davidsharp7 commented Nov 10, 2024

Problem

Emitting a JobEvent with input and/or output datasets causes a HTTP500 error in the API, which results from a nullPointerException in Marquez.

Closes: #2925

Solution

Make runuuid/Lineage event type nullable

on

insertInputDatasetFacetsFor
insertOutputDatasetFacetsFor

Nullable

Following post which used to fail now posts correctly.

r=requests.post(url='http://localhost:8080/api/v1/lineage', 
                json={"eventTime": "2024-11-11T20:03:30.112534+00:00", 
                      "inputs": [{"facets": {}, 
                                  "inputFacets": {}, 
                                  "name": "users", 
                                  "namespace": "openlineage_experiments.py_static_tests"}], 
                      "job": {"facets": {"sql": {"_producer": "https://github.com/OpenLineage/OpenLineage/tree/1.22.0/client/python", 
                                                 "_schemaURL": "https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/SqlJobFacet", 
                                                 "query": "SELECT * FROM users JOIN orders ON users.id = orders.user_id"}}, 
                              "name": "xjob_with_inputs_and_outputs", 
                              "namespace": "openlineage_experiments.py_static_tests"}, 
                      "outputs": [{"facets": {}, "name": "orders", 
                                   "namespace": "openlineage_experiments.py_static_tests", 
                                   "outputFacets": {}}], 
                      "producer": "https://github.com/openlineage-user", 
                      "schemaURL": "https://openlineage.io/spec/1-0-5/OpenLineage.json#/definitions/JobEvent"})
Screenshot 2024-11-10 at 14 53 07

One-line summary:

Make runuuid/Lineage event type nullable

Checklist

  • You've signed-off your work
  • Your changes are accompanied by tests (if relevant)
  • Your change contains a small diff and is self-contained
  • You've updated any relevant documentation (if relevant)
  • You've included a one-line summary of your change for the CHANGELOG.md (Depending on the change, this may not be necessary).
  • You've versioned your .sql database schema migration according to Flyway's naming convention (if relevant)
  • You've included a header in any source code files (if relevant)

Signed-off-by: sharpd <davidsharp7@gmail.com>
@boring-cyborg boring-cyborg bot added the api API layer changes label Nov 10, 2024
Copy link

netlify bot commented Nov 10, 2024

Deploy Preview for peppy-sprite-186812 ready!

Name Link
🔨 Latest commit 5de73f0
🔍 Latest deploy log https://app.netlify.com/sites/peppy-sprite-186812/deploys/675caf6d0e116600082a8b22
😎 Deploy Preview https://deploy-preview-2974--peppy-sprite-186812.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.18%. Comparing base (aa1cecf) to head (5de73f0).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2974      +/-   ##
============================================
- Coverage     81.19%   81.18%   -0.02%     
  Complexity     1506     1506              
============================================
  Files           268      268              
  Lines          7360     7356       -4     
  Branches        325      325              
============================================
- Hits           5976     5972       -4     
  Misses         1226     1226              
  Partials        158      158              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davidsharp7 davidsharp7 marked this pull request as ready for review November 13, 2024 07:50
Copy link
Member

@wslulciuc wslulciuc left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, @davidsharp7 💯 💯 👍

@wslulciuc wslulciuc enabled auto-merge (squash) December 13, 2024 22:04
@wslulciuc wslulciuc merged commit a3c8823 into main Dec 13, 2024
15 checks passed
@wslulciuc wslulciuc deleted the bug/job-event-null-pointer-outputs branch December 13, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api API layer changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JobEvent with outputs populated fails to write with nullPointerException
2 participants