-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
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
- Open Ontos and go to
Data Contracts. - Click
Upload File. - 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- Observe that
POST /api/data-contracts/uploadreturns500and the upload fails.
Control comparison:
- 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.- Observe that
POST /api/data-contracts/uploadreturns200and 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"
}
}Reactions are currently unavailable