jhg03a opened a new issue #2006: TO Database Migration Failures don't trigger 
non-zero exit codes
URL: https://github.com/apache/incubator-trafficcontrol/issues/2006
 
 
   At commit b3770891d5078dfd694cf6aa4d179b34f00ed101 I ran a normal admin.pl 
migration and noticed that there was an error, yet this didn't trigger a 
non-zero exit code for other tools to know there was an error.  This is 
continually reproducible at this commit even without restoring a backup of the 
database.  The specific failure is noted below.
   
   As an administrator, I expect errors in the database migration to result in 
non-zero exit codes so that automation scripts and other tools can know when 
something has gone wrong.
   
   Specific Failure at commit b3770891d5078dfd694cf6aa4d179b34f00ed101:
   > insert into api_capability (http_method, route, capability) values 
('POST', '/api/*/deliveryservices/*/servers', 'ds-cache-write') ON CONFLICT 
(http_method, route, capability) DO NOTHING;
   ERROR:  insert or update on table "api_capability" violates foreign key 
constraint "fk_capability"
   DETAIL:  Key (capability)=(ds-cache-write) is not present in table 
"capability".
   
   With the standard command:
   `PATH=$PATH:./go/bin PERL5LIB=./lib:./local/lib/perl5 ./db/admin.pl 
-env=production upgrade`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to