genome / gms

The Genome Modeling System installer
https://github.com/genome/gms/wiki
GNU Lesser General Public License v3.0
78 stars 22 forks source link

schema errors during Make are not caught #163

Open gatoravi opened 9 years ago

gatoravi commented 9 years ago

Errors like

DBD::Pg::st execute failed: ERROR: duplicate key value violates unique constraint "group_pkey" DETAIL: Key (id)=(1) already exists. at /opt/gms/UMBIU92/sw/ur/lib/UR/DBI.pm line 888. ERROR: Genome::DataSource::GMSchema: Error executing SQL: INSERT INTO disk.group (unix_uid,unix_gid,subdirectory,permissions,name,id) VALUES (?,?,?,?,?,?) PARAMS: '2001', '2001', 'info', '775', 'reads', '1' ERROR: duplicate key value violates unique constraint "group_pkey" DETAIL: Key (id)=(1) already exists. ERROR: Failed to sync data source: Genome::DataSource::GMSchema: Genome::DataSource::GMSchema: Error executing SQL: INSERT INTO disk.group (unix_uid,unix_gid,subdirectory,permissions,name,id) VALUES (?,?,?,?,?,?) PARAMS: '2001', '2001', 'info', '775', 'reads', '1' ERROR: duplicate key value violates unique constraint "group_pkey" DETAIL: Key (id)=(1) already exists.

slip through the install process. We need to catch these errors.

gatoravi commented 9 years ago

this error might have been caused due to trying to insert same values into the table again(by re-running make) hence violating some primary-key constraints. It would still help to catch these and die during the make process.