Jira (PDB-3268) Don't just return nothing from applied-migrations if the query fails

0 views
Skip to first unread message

Rob Browning (JIRA)

unread,
Jan 24, 2017, 4:07:12 PM1/24/17
to puppe...@googlegroups.com
Rob Browning created an issue
 
PuppetDB / Bug PDB-3268
Don't just return nothing from applied-migrations if the query fails
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2017/01/24 1:06 PM
Labels: maintenance
Priority: Normal Normal
Reporter: Rob Browning

For example when this happens "ERROR: permission denied for relation schema_migrations", the result probably shouldn't be an empty set of migrations.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Ryan Senior (JIRA)

unread,
Mar 9, 2017, 4:39:12 PM3/9/17
to puppe...@googlegroups.com

Ryan Senior (JIRA)

unread,
Mar 22, 2017, 7:10:02 PM3/22/17
to puppe...@googlegroups.com

Russell Mull (JIRA)

unread,
Jul 24, 2017, 12:31:03 PM7/24/17
to puppe...@googlegroups.com

Rob Browning (JIRA)

unread,
May 7, 2018, 4:41:03 PM5/7/18
to puppe...@googlegroups.com
Rob Browning updated an issue
Change By: Rob Browning
Sprint: Hopper/Triage
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Austin Blatt (JIRA)

unread,
Jul 10, 2018, 12:55:03 PM7/10/18
to puppe...@googlegroups.com

Austin Blatt (JIRA)

unread,
Jul 19, 2018, 7:17:02 PM7/19/18
to puppe...@googlegroups.com
Austin Blatt commented on Bug PDB-3268
 
Re: Don't just return nothing from applied-migrations if the query fails

We currently return the empty set whenever we encounter an SQLException related to the schema_migrations table. This appears to be primarily to handle the case of PostgreSQL's error state of 42P01, undefined_table. In this case the PuppetDB needs to be created. In all other cases, there doesn't seem to be a benefit to catching the error and attempting to continue because the database already exists, attempting to re-apply migrations, which I believe will happen, could break the database state. We should instead let this error percolate up.

We also specifically squash the error stay 42501 (labelled as for hsqldb). Since we no longer support that database, but it is also PostgreSQL's error state for insufficient_privilege, I'd recommend we either print a nicer error message if its likely that people will be using the wrong database user. If it's unlikely that they use the wrong database user, we can just let it percolate up as the rest do.

Austin Blatt (JIRA)

unread,
Jul 23, 2018, 3:33:03 PM7/23/18
to puppe...@googlegroups.com

Rob Browning (JIRA)

unread,
Jul 26, 2018, 1:45:03 PM7/26/18
to puppe...@googlegroups.com

Rob Browning (JIRA)

unread,
Jul 26, 2018, 1:46:07 PM7/26/18
to puppe...@googlegroups.com
Rob Browning updated an issue
Change By: Rob Browning
Release Notes Summary: PuppetDB should no longer attempt database migrations at startup under inappropriate conditions, for example when the relevant migrations table is unreadable.
Release Notes: Bug Fix

Kenn Hussey (JIRA)

unread,
Sep 5, 2018, 9:22:03 AM9/5/18
to puppe...@googlegroups.com

Zachary Kent (Jira)

unread,
Mar 10, 2021, 3:33:05 PM3/10/21
to puppe...@googlegroups.com
Zachary Kent updated an issue
Change By: Zachary Kent
Sprint:
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Zachary Kent (Jira)

unread,
Mar 10, 2021, 3:34:03 PM3/10/21
to puppe...@googlegroups.com
Zachary Kent updated an issue
Change By: Zachary Kent
Sprint: Release Engineering Hopper

Morgan Rhodes (Jira)

unread,
Mar 11, 2021, 2:29:04 PM3/11/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages