typedb-driver icon indicating copy to clipboard operation
typedb-driver copied to clipboard

Renaming concepts throws various errors

Open james-whiteside opened this issue 1 year ago • 1 comments

Description

When trying to rename concepts in the Bio project after making changes to the schema, several different errors were thrown by Studio, and also by Client Python:

TypeDBClientException: [SRV27] Invalid Server Operation: Concept does not exist.
TypeDBClientException: [TYR03] Invalid Type Read: The type 'gene-gene-interaction' does not exist.
TypeDBClientException: [TYR04] Invalid Type Read: There are no role types of label 'interacting-gene' in the scope of 'gene-gene-interaction'

SRV27 was thrown on call when trying to rename a relation via the Studio UI. SRV27 was thrown on call when trying to rename a relation and a role in a single transaction via the Python API. TYR03 was thrown on commit when trying to rename a relation via the Python API. TYR04 was thrown on commit when trying to rename a role via the Python API.

Environment

  1. OS (where TypeDB server runs): MacOS 12.6.1
  2. TypeDB version (and platform): 2.19.0
  3. Studio version: 2.18.1
  4. Client Python version: 2.18.1

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Clone TypeDB Bio from https://github.com/typedb-osi/typedb-bio/commit/fd1e171477d3f829c14805934a7d49d516edc512
  2. Run python loader.py -f True from repo root.
  3. Wait an hour or two.
  4. Attempt to rename the relation gene-gene-interaction and/or its role interacting-gene.

This might be possible to reproduce without actually running the whole loader. The schema can be found from the repo root under schema/schema.tql. Probably worth manually committing the schema first and attempting to rename then.

james-whiteside avatar Jul 13 '23 11:07 james-whiteside

Update with TypeDB Cloud 2.24.17 and Studio / Python 2.24.15

  • SRV27 is no longer thrown by either Studio or Python API.
  • No errors are thrown with Python API.
  • Studio continues to throw TYR03 when renaming a relation, but only when the type browser is open. If it is closed on commit, then no error is thrown. TYR04 not re-tested.
  • It looks like SRV27 was inadvertently solved at some point. The type browser in Studio now appears to be the only remaining problem.

james-whiteside avatar Nov 13 '23 18:11 james-whiteside