cedadev / nlds

Near Line Data Store
Other
9 stars 0 forks source link

nlds put Exception during callback: (psycopg2.errors.InvalidTextRepresentation) invalid input value for enum state: "CATALOG_ROLLBACK" LINE 1: UPDATE sub_record SET state='CATALOG_ROLLBACK', retry_count=... #81

Closed mbanjestfc closed 10 months ago

mbanjestfc commented 11 months ago

I tried to put a file in CEDAPROC and gor the following error: State of transaction for user:mbanjec, group:cedaproc, id:130 id : 130 user : mbanjec group : cedaproc action : put transaction id : adbd7e39-c000-47be-a16f-ffb835cb5348 label : creation time : 2023-12-22 09:41:26.644178 state : FAILED warnings : sub records ->

[SQL: UPDATE sub_record SET state=%(state)s, retry_count=(sub_record.retry_count + %(retry_count_1)s), last_updated=now() WHERE sub_record.id = %(sub_record_id)s] [parameters: {'state': 'CATALOG_ROLLBACK', 'retry_count_1': 1, 'sub_record_id': 54}] (Background on this error at: https://sqlalche.me/e/14/9h9h)

jackleland commented 10 months ago

There's two issues here, one caused by not catching the S3 authentication failure, and one by improper migration of the STATE enum in postgres

jackleland commented 10 months ago

This is now fixed as of 5eea605 and a re-running of the migration of ENUMs. The authentication exception was being caught and handled appropriately