On the catalog registration page in TAP GUI, you can register a github repository catalog by clicking "Register entity". However, customer hit an error message when customer was trying to delete a registered catalog.
Error message as below -
{
"error": {
"name": "error",
"message": "select * from \"locations\" where \"id\" = $1 - invalid input syntax for type uuid: \"url:https://github.com/###/blob/main/catalog/catalog-info.yaml\"",
"length": 209,
"severity": "ERROR",
"code": "22P02",
"where": "unnamed portal parameter $1 = '...'",
"file": "uuid.c",
"line": "134",
"routine": "string_to_uuid"
},
"request": {
"method": "GET",
"url": "/locations/url%3Ahttps%3A%2F%2Fgithub.com%2###%2Fblob%2Fmain%2Fcatalog%2Fcatalog-info.yaml"
},
"response": {
"statusCode": 500
}
}TAP v1.12
This is a known issue in TAP v1.12, customer should follow the workaround - Delete the record in the SQL database backing the catalog, then clear the browser cache as well as restart the tap-gui pod on the cluster to resolve it.
Below is the instruction how to connect to the backend database and delete the record:
Step 1. Identify the pod of TAP GUI DB:
$ kubectl get pods -n tap-gui
NAME READY STATUS RESTARTS AGE
server-#### 1/1 Running 0 6h17m
tap-gui-db-#### 1/1 Running 0 6h17m
Step 2. Execute command in TAP GUI DB container and connect to the backstage_plugin_catalog database:
$ kubectl exec -it -n tap-gui tap-gui-db-#### -- /bin/bash
Defaulted container "postgres" out of: postgres, remove-lost-found (init)
tap-gui-db-####:/# psql -U $POSTGRES_USER
psql (14.17)
Type "help" for help.
tap-gui=# \c backstage_plugin_catalog
You are now connected to database "backstage_plugin_catalog" as user "tap-gui".
Step 3. Identify the url records and delete the corresponding record:
backstage_plugin_catalog=# SELECT * FROM locations;
id | type | target
--------------------------------------+-----------+-----------------------------------------------------------------------------------------
11a0419c-###-e10e941a63ed | bootstrap | bootstrap
34154f4a-###-46001e9ca004 | url | https://github.com/###/blob/main/catalog/catalog-info.yaml
(2 rows)
backstage_plugin_catalog=# SELECT * FROM locations WHERE id ='34154f4a-###-46001e9ca004';
id | type | target
--------------------------------------+------+---------------------------------------------------------------------------
34154f4a-###-46001e9ca004 | url | https://github.com/###/blob/main/catalog/catalog-info.yaml
(1 row)
backstage_plugin_catalog=# DELETE FROM locations WHERE id = '34154f4a-###-46001e9ca004';
DELETE 1
backstage_plugin_catalog=# SELECT * FROM locations;
id | type | target
--------------------------------------+-----------+-----------
11a0419c-###-e10e941a63ed | bootstrap | bootstrap
(1 row)