Skip to content

[Bug] Marquez fails due to empty namespace name #2547

@YLibert

Description

@YLibert

Issue

Marquez fails to load when a Namespace with an empty name is in its database

Root cause

We received an event coming from the Airflow Integration:

{
  "job": {
    "name": "hello_world.create_table",
    "facets": {
      "sql": {
        "query": "REDACTED",
        "_producer": "https://github.com/OpenLineage/OpenLineage/tree/0.21.1/integration/airflow",
        "_schemaURL": "https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/SqlJobFacet"
      },
      "ownership": {
        "owners": [
          {
            "name": "airflow"
          }
        ],
        "_producer": "https://github.com/OpenLineage/OpenLineage/tree/0.21.1/integration/airflow",
        "_schemaURL": "https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/OwnershipJobFacet"
      },
      "documentation": {
        "_producer": "https://github.com/OpenLineage/OpenLineage/tree/0.21.1/integration/airflow",
        "_schemaURL": "https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/DocumentationJobFacet",
        "description": "Hello world example"
      }
    },
    "namespace": "REDACTED"
  },
  "run": {
    "runId": "619939e3-d8bf-38e2-b4f5-3285f4f10f03",
    "facets": { ... Lenghty Airflow facets not relevant here...}
  },
  "inputs": [],
  "outputs": [
    {
      "name": "REDACTED",
      "facets": {
        "dataSource": {
          "uri": "REDACTED",
          "name": "",
          "_producer": "https://github.com/OpenLineage/OpenLineage/tree/0.21.1/integration/airflow",
          "_schemaURL": "https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/DataSourceDatasetFacet"
        }
      },
      "namespace": ""
    }
  ],
  "producer": "https://github.com/OpenLineage/OpenLineage/tree/0.21.1/integration/airflow",
  "eventTime": "2023-07-19T14:45:44.487112Z",
  "eventType": "START"
}

I redacted some of the info as it is from a preproduction env.

This resulted in the creation of a namespace of name '' in the database.

As a result, the Marquez main page could not load due to an error 500:

! java.lang.IllegalArgumentException: namespace '' must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), at (@), plus (+), dashes (-), colons (:), equals (=), semicolons (;), slashes (/) or dots (.) with a maximum length of 1024 characters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions