MarquezProject / marquez

Collect, aggregate, and visualize a data ecosystem's metadata
https://marquezproject.ai
Apache License 2.0
1.78k stars 320 forks source link

Fix null pointer on Dataset facets #2967

Closed davidsharp7 closed 2 weeks ago

davidsharp7 commented 2 weeks ago

Problem

Currently a POST such as this

{
  "eventType": "START",
  "eventTime": "2022-03-02T18:09:08.621531103+01:00",
  "run": {
    "runId": "28b5c373-1eef-4845-82a6-98bba8f7541c",
    "facets": {}
  },
  "job": {
    "namespace": "my-namespace",
    "name": "a-job",
    "facets": {}
  },
  "inputs": [
    {
      "namespace": "imdb",
      "name": "movies",
      "facets": {
        "dataSource": {
          "_producer": "",
          "_schemaURL": "https://github.com/OpenLineage/OpenLineage/blob/0.5.2/spec/facets/DatasourceDatasetFacet.json",
          "name": "movies.csv"
        }
      },
      "inputFacets": {}
    }
  ],
  "outputs": [],
  "producer": "my-producer",
  "schemaUrl": "https://openlineage.io/spec/1-0-2/OpenLineage.json"
}

will result in a null pointer exception as null is not a valid value to pass to URI.

Closes: #1890

Solution

If the uri is null return an empty string

One-line summary:

Fix null pointer exception for Dataset Source Facets

Checklist

netlify[bot] commented 2 weeks ago

Deploy Preview for peppy-sprite-186812 canceled.

Name Link
Latest commit ffafdf6f9216e9077a4a56721ed7d48a5f435c18
Latest deploy log https://app.netlify.com/sites/peppy-sprite-186812/deploys/6725a6a426c04600080a73c1
codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.19%. Comparing base (9260a7a) to head (ffafdf6). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2967 +/- ## ========================================= Coverage 81.19% 81.19% - Complexity 1505 1506 +1 ========================================= Files 268 268 Lines 7358 7360 +2 Branches 325 325 ========================================= + Hits 5974 5976 +2 Misses 1226 1226 Partials 158 158 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.