*** diablo_rojo has joined #storyboard | 00:50 | |
*** diablo_rojo has quit IRC | 01:14 | |
*** diablo_rojo_phon has quit IRC | 02:20 | |
*** zara_the_lemur__ has quit IRC | 03:45 | |
*** yarkot has quit IRC | 06:06 | |
*** yarkot has joined #storyboard | 06:31 | |
*** Bluebell- has joined #storyboard | 07:07 | |
*** Bluebell- has left #storyboard | 07:17 | |
openstackgerrit | Andreas Jaeger proposed openstack-infra/storyboard: Prepare for using standard python tests https://review.openstack.org/427589 | 08:58 |
---|---|---|
persia | For launchpad questions, there is also #launchpad. Best earlier in the day (AU/UK timezones) | 09:16 |
*** fay has joined #storyboard | 10:30 | |
*** fay is now known as Guest47933 | 10:31 | |
*** faybrocklebank has quit IRC | 10:32 | |
*** odyssey4me has left #storyboard | 11:18 | |
Zara | back to these enums... | 11:32 |
Zara | so far the only difference I've found between that code and the 012 one is that the 012 one returns more than one key-value pair in the object | 11:37 |
Zara | that seems like a bizarre reason for things to break, though | 11:37 |
Zara | so https://github.com/openstack-infra/storyboard/blob/master/storyboard/db/migration/alembic_migrations/versions/012_task_states.py is fine | 11:46 |
Zara | https://github.com/openstack-infra/storyboard/blob/master/storyboard/db/migration/alembic_migrations/versions/018_task_priority.py fails | 11:46 |
Zara | with sqlalchemy.exc.ProgrammingError: (ProgrammingError) type "task_priority" does not exist | 11:46 |
Zara | LINE 1: ALTER TABLE tasks ADD COLUMN task_priority task_priority | 11:46 |
Zara | ^ | 11:46 |
Zara | 'ALTER TABLE tasks ADD COLUMN task_priority task_priority' {} | 11:46 |
SotK | why is it trying to add a column named task_priority? | 11:48 |
Zara | oh I might've changed that while hacking around, should be priority task_priority | 11:49 |
Zara | same error though | 11:49 |
Zara | sqlalchemy.exc.ProgrammingError: (ProgrammingError) type "task_priority" does not exist | 11:49 |
Zara | LINE 1: ALTER TABLE tasks ADD COLUMN priority task_priority | 11:49 |
Zara | ^ | 11:49 |
Zara | 'ALTER TABLE tasks ADD COLUMN priority task_priority' {} | 11:49 |
Zara | there | 11:49 |
Zara | that's what I get with the actual code, sorry | 11:49 |
Zara | I even started changing indentation to see if that helped; nothing | 11:56 |
Zara | if I can't get this to work, are there other options? | 12:57 |
SotK | maybe | 13:15 |
SotK | you can create an empty database, and then make alembic generate one giant migration to set it up according to the current schema | 13:15 |
* SotK will find docs | 13:15 | |
SotK | I suspect that just https://github.com/openstack-infra/storyboard/blob/master/storyboard/db/migration/README#L60-L61 will be enough, if you move `storyboard/db/migration/alembic_migrations/*` out of the way | 13:18 |
Zara | ah, right, I could try that | 13:20 |
* Zara will spend a bit longer on this since she figures problems here will indicate issues elsewhere | 13:21 | |
Zara | I am veering toward 'this is the only place where a new column is created using enums and is not created as part of a new table' (012 uses task statuses which have already been created, even if it then drops them) | 13:27 |
SotK | maybe alembic/sqlalchemy doesn't know it needs to create an enum if it is only adding a column or something when using postgresql | 13:30 |
Zara | yep, I think so | 13:30 |
* Zara peers at https://bitbucket.org/zzzeek/alembic/issues/89/opadd_column-and-opdrop_column-should | 13:37 | |
Zara | I wonder why postgresql uses 'typname' and 'rolname' instead of 'typename' and 'rolename'. guessing a character-limit somewhere? | 13:41 |
* SotK has no idea | 13:52 | |
openstackgerrit | Andreas Jaeger proposed openstack-infra/storyboard: Prepare for using standard python tests https://review.openstack.org/427589 | 14:45 |
*** Guest47933 has quit IRC | 15:14 | |
Zara | I tried the workaround suggested but I get a syntax error if I include a name for the enum, and a 'no name' error if I don't | 15:42 |
* Zara is not confident she knows what's going on in the workaround | 15:43 | |
*** fay has joined #storyboard | 15:44 | |
*** fay is now known as Guest22203 | 15:44 | |
SotK | does the workaround further down the page do the same thing? | 15:46 |
Zara | I couldn't get it working but I'm going to come back to it | 15:49 |
Zara | currently trying the 'create a migration from current setup approach) | 15:49 |
Zara | okay, that has made a thing at least | 15:54 |
Zara | (I had some fun because I accidentally deleted the env.py the first time) | 15:55 |
Zara | made a migration script, tried to run the upgrade command, first got error because 'storyboard' was not found, imported storyboard, now getting another error... (will paste various things) | 15:59 |
Zara | my migration script: http://paste.openstack.org/show/597218/ | 16:03 |
Zara | (might be a bit weird; pasting from vm was not fun) | 16:03 |
Zara | and current error: http://paste.openstack.org/show/597219/ | 16:04 |
Zara | so it's just for comment fields that I think are populated in a mysql-specific way | 16:10 |
Zara | for comment content and comment content history | 16:11 |
* Zara wonders what will happen if she just changes it to UnicodeText | 16:12 | |
Zara | sqlalchemy.exc.CompileError: Postgresql ENUM type requires a name. | 16:15 |
Zara | when running line 124 of my migration script, going from the trace | 16:16 |
Zara | which is weird since it looks a lot like other lines before it | 16:17 |
SotK | but the sa.Enum on line 122 doesn't have a name | 16:18 |
Zara | ahh, right | 16:19 |
Zara | it's the first enum from the looks of it | 16:19 |
Zara | and none of them have names | 16:20 |
Zara | (recorded there, anyway | 16:20 |
SotK | \o/ | 16:20 |
SotK | manual editing time! | 16:20 |
Zara | :D I think you mean *more* manual editing time! :D | 16:20 |
Zara | this script will be the snowflakeiest snowflake ever to have snowflaked | 16:20 |
Zara | looks like there are 7 of them | 16:21 |
Zara | I bet I get the same syntax error as before when I name them | 16:21 |
Zara | hm, now I'm wondering what the name should be (column name or table name (or am I totally confused)) | 16:22 |
SotK | $tablename_$columnname probably makes sense | 16:22 |
Zara | fair enough | 16:23 |
*** diablo_rojo_phon has joined #storyboard | 16:24 | |
Zara | SotK: huh it actually worked | 16:25 |
Zara | time to see what's going on inside | 16:27 |
SotK | \o/ | 16:27 |
Zara | http://paste.openstack.org/show/597225/ | 16:28 |
Zara | or better http://paste.openstack.org/show/597226/ | 16:28 |
Zara | projects and project groups seem to be okay (none in the db yet though) | 16:29 |
* Zara goes to make herself an admin and realises she doesn't know how in postgres xD | 16:30 | |
Zara | well I finally worked out how to connect to the right db | 16:45 |
Zara | but after logging in... | 16:45 |
Zara | (well, connecting to the right db...) | 16:45 |
Zara | storyboard=# \du | 16:45 |
Zara | List of roles | 16:45 |
Zara | Role name | Attributes | Member of | 16:45 |
Zara | ------------+------------------------------------------------+----------- | 16:45 |
Zara | postgres | Superuser, Create role, Create DB, Replication | {} | 16:45 |
Zara | root | | {} | 16:45 |
Zara | storyboard | Superuser | {root} | 16:46 |
Zara | where is Zara | 16:46 |
Zara | where has she gone | 16:46 |
Zara | it is showing the right tables | 16:52 |
Zara | oh okay guessing that's db users and I need things in the users table of the db | 16:54 |
*** diablo_rojo has joined #storyboard | 16:59 | |
Zara | successfully managed it, anyway :) | 17:00 |
SotK | \o/ | 17:01 |
Zara | once I create a project, I get a nice error message | 17:01 |
SotK | what is it? | 17:02 |
Zara | same one as before, I think | 17:02 |
Zara | http://paste.openstack.org/show/597239/ | 17:02 |
Zara | and I think same again once I add that project to a project group | 17:03 |
SotK | hm | 17:04 |
Zara | if I try to create a story | 17:04 |
Zara | 400: POST /api/v1/stories: Foreign key error. Error in object 'Story'. Field 'story_type_id' value 'stories_story_type_id_fkey' is invalid. | 17:04 |
* SotK makes sad faces in the direction of sqlalchemy | 17:05 | |
Zara | a glance suggests we don't have any Foreign Keys for story types... | 17:08 |
Zara | at least, this is what we have in models.py http://paste.openstack.org/show/597244/ | 17:08 |
Zara | oh, but the teams stuff | 17:10 |
Zara | and stories themselves | 17:10 |
Zara | http://paste.openstack.org/show/597246/ | 17:13 |
Zara | so I guess one thing it doesn't like is [(func.sum(Task.status.in_( | 17:23 |
Zara | ['todo', 'inprogress', 'review'])) > 0, | 17:23 |
Zara | 'active'), | 17:23 |
Zara | (from the bigger error message | 17:23 |
Zara | ((func.sum(Task.status == 'merged')) > 0, 'merged')], | 17:23 |
Zara | and that 400 might be a different thing | 17:23 |
Zara | http://paste.openstack.org/show/597250/ is the code | 17:23 |
Zara | for the stuff like DBError: (ProgrammingError) function sum(boolean) does not exist | 17:24 |
Zara | LINE 2: ...AS is_bug, stories.private AS private, CASE WHEN (sum(tasks.... | 17:24 |
Zara | ^ | 17:24 |
Zara | HINT: No function matches the given name and argument types. You might need to add explicit type casts. | 17:24 |
SotK | maybe sqlalchemy doesn't know how to make postgresql understand that for some reason | 17:29 |
* SotK thought this is what sqlalchemy is *for* tbh | 17:29 | |
Zara | I'm wondering if my manual-naming of enums could possibly cause this, but seems unrelated | 17:30 |
Zara | it does not help that I have roughly the understanding of an actual lemur | 17:34 |
Zara | I definitely need to do more work around talking to databases, so this is good for me | 17:36 |
Zara | I'll just tell myself that | 17:36 |
* Zara hasn't found any docs suggesting others have had this trouble, yet | 17:40 | |
Zara | so it might also be reporting the issue in the wrong place | 17:40 |
* Zara finds http://stackoverflow.com/questions/24134266/error-function-sumcharacter-varying-does-not-exist-using-sum-with-sql-alchem | 17:41 | |
Zara | so... something isn't treated as an int. when it should be. maybe. | 17:42 |
* SotK shrugs | 17:45 | |
* Zara finds https://bugzilla.mozilla.org/show_bug.cgi?id=284125 | 17:45 | |
openstack | Mozilla bug 284125 in Query/Bug List "PostgreSQL cannot call SUM on a boolean (Boolean Charts)" [Normal,Resolved: fixed] - Assigned to Tomas.Kopal | 17:45 |
Zara | huh, never knew about that bot | 17:46 |
Zara | hello bot | 17:46 |
Zara | anyway, my brain is fried; will look more tomorrow | 18:10 |
Zara | though reminder: storyboard meeting in 50 minutes! | 18:10 |
*** diablo_rojo has quit IRC | 18:21 | |
*** diablo_rojo has joined #storyboard | 18:24 | |
*** zara_the_lemur__ has joined #storyboard | 18:36 | |
zara_the_lemur__ | meeting in 1 min! | 18:59 |
openstackgerrit | Merged openstack-infra/storyboard: Remove contentless operator manual https://review.openstack.org/418122 | 19:38 |
zara_the_lemur__ | thanks, SotK! | 19:42 |
*** diablo_rojo has quit IRC | 19:54 | |
*** Guest22203 has quit IRC | 20:01 | |
*** diablo_rojo_phon has quit IRC | 20:20 | |
*** diablo_rojo has joined #storyboard | 20:55 | |
*** diablo_rojo has quit IRC | 21:11 | |
*** diablo_rojo_phon has joined #storyboard | 22:01 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!