databrickslabs / databrickslabs/ontos

[Bug]: Data contract file upload fails when the contract contains support entries

Open
#73 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status/needs-triage type/bug
Dominant language
Python
Stars
212
Forks
71
Avg merge
4d 10h
Merged PRs (30d)
43

Description

Is there an existing issue for this?
  • I have searched the existing issues
Current Behavior

Uploading a data contract file through the UI fails when the contract contains a support section.

I reproduced this in the Ontos UI using a minimal public ODCS example. Uploading the YAML file via Data Contracts -> Upload File returns 500 with {"detail":"Upload failed"}.

Audit log for the same failure shows:

TypeError: 'type' is an invalid keyword argument for DataContractSupportDb

The same file upload path succeeds when the contract does not contain support.

Additionally, after upload attempts the frontend throws Uncaught ReferenceError: Loader2 is not defined.

Expected Behavior

Uploading a valid ODCS contract file should import the contract successfully, including contracts that contain a support section.

Steps To Reproduce
  1. Open Ontos and go to Data Contracts.
  2. Click Upload File.
  3. Upload this minimal YAML:
kind: DataContract
apiVersion: v3.1.0
id: urn:datacontract:example:public:upload:repro
name: public_support_upload_repro
version: 1.0.0
status: draft
description:
  purpose: Minimal public repro for Ontos contract upload failure.
support:
  - channel: "#support-example"
    tool: slack
    scope: technical
    url: https://example.com/support-example
  1. Observe that POST /api/data-contracts/upload returns 500 and the upload fails.

Control comparison:

  1. Upload this minimal YAML without support:
kind: DataContract
apiVersion: v3.1.0
id: urn:datacontract:example:public:upload:control
name: public_upload_control
version: 1.0.0
status: draft
description:
  purpose: Minimal public control contract without support entries.
  1. Observe that POST /api/data-contracts/upload returns 200 and the contract is created successfully.
Cloud

AWS

Browser

Chrome

Version

latest

Relevant log output
Failing file upload request
- Endpoint: POST /api/data-contracts/upload
- Status: 500
- Request ID: cd5d5bec-1f33-47cd-83e6-6b524d713ff7
- Response body: {"detail":"Upload failed"}

Successful control upload
- Endpoint: POST /api/data-contracts/upload
- Status: 200
- Request ID: afe89685-b51b-4312-a419-7ace60e0adbf

Frontend console
Failed to load resource: the server responded with a status of 500 ()
Uncaught ReferenceError: Loader2 is not defined

Audit log
{
  "params": {
    "filename": "minimal-support-upload-repro.odcs.yaml"
  },
  "exception": {
    "type": "TypeError",
    "message": "'type' is an invalid keyword argument for DataContractSupportDb"
  }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the POST /api/data-contracts/upload path and the DataContractSupportDb error reported in the audit log. Trace how support entries are passed during import, then inspect the frontend upload error where Loader2 is referenced. Done means the supplied support YAML uploads successfully and the frontend no longer raises the Loader2 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.