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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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)

@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 4ccc0b8
🔍 Latest deploy log https://app.netlify.com/sites/peppy-sprite-186812/deploys/673457bf7ea2be0008244786
😎 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 (41d9d3d) to head (4ccc0b8).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2974      +/-   ##
============================================
+ Coverage     81.02%   81.18%   +0.16%     
- Complexity      241     1506    +1265     
============================================
  Files            43      268     +225     
  Lines           996     7356    +6360     
  Branches         40      325     +285     
============================================
+ Hits            807     5972    +5165     
- Misses          160     1226    +1066     
- Partials         29      158     +129     

☔ 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
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
1 participant