Wednesday, 2015-12-02

pedroalvarezSotK: well, created new user, went to preferences page, tried to uncheck one of them, and got this: http://paste.baserock.org/rimusezamu00:37
pedroalvarezdropped all its preferences from user_preferences, and now works: http://paste.baserock.org/teyomomaha00:42
pedroalvarez:S00:42
SotKo.O00:43
SotKhow completely bizarre00:44
pedroalvarezright, new user, and just opening the prefs page: http://paste.baserock.org/tuzoruxiva00:47
pedroalvarezmadness00:47
SotKhmm00:47
SotKI wonder why the update function is called so many times00:47
SotKI suspect it tries to set defaults for all preferences once per preference00:48
SotKbut I don't understand why that would only happen for a new user00:49
* SotK will investigate more tomorrow, too sleepy now :)00:50
pedroalvarezyeah! night!00:51
*** cody-somerville has quit IRC01:29
*** cody-somerville has joined #storyboard01:36
*** mrmartin has joined #storyboard03:53
*** mrmartin has quit IRC05:57
*** thrace has quit IRC06:01
*** thrace has joined #storyboard06:04
*** mrmartin has joined #storyboard07:56
SotKgood morning!10:38
Zaramorning, storyboard!10:38
Zarahm, at the time you two were discussing preferences, I was watching peep show... I'd feel bad, but it was nearly 1am.10:39
SotK:)10:40
SotKin your notifications roadmap/spec thing, does it make sense to add a requirement for a page on which a user can see all of the things they're subscribed to?10:49
Zarayeah, or at least some place (eg: maybe it wouldn't need to be a page but some sort of popup box)10:51
ZaraI think I'd implied that but maybe jumped over it, and it needs to be explicit, anyway10:52
Zaraso please add anything that's missing; I think it's at the point where it needs fleshing out from a few people.10:52
Zarathere are big gaps (especially on the 'how does storyboard currently track a user's subscriptions?') side; I put a lot in about how things were represented in the UX but there's not much detail about the inner workings.10:53
* SotK will try to flesh out that bit today then10:53
Zarathanks, in return I will try to review all the things!10:54
SotKOK, I think I may have discovered (part) of the preferences problem...10:56
SotKin Preference.save() there is a comment: "If preferences are defaults, they won't have a $save() method."10:58
SotKhowever, it appears that for some reason, even the default preferences have a $save() method10:58
SotKthis is why there are 16 POST requests made that all pass a dict of all the preferences when the preferences page is accessed without any preferences set10:59
SotK(Preference.save() is called once per unset preference)11:00
SotK(but with the expectation that the unset preference won't be saved, as it is just using the default)11:00
* SotK digs deeper11:04
Zarahehe11:05
pedroalvarezI noted the following yesterday: With no preferences in the db, you open the preferences page, madness happen11:07
pedroalvarezAnd, with no preferences in the db, preferences page already open, change preference. Everything ok11:07
SotKhmm11:09
SotKI suspect its definitely to do with the spam when setting defaults then, since that doesn't happen if the page is already open11:09
SotKI dunno why this is only causing an issue for you and the production instance though11:09
Zarahm, weird, I got an error when updating my db, but it seems to have worked anyway11:16
SotKwhat error was it?11:17
Zarastoryboard.common.exception.DBDuplicateEntry: Database object already exists.11:18
ZaraERROR: InvocationError: '/home/ubuntu/storyboard/.tox/venv/bin/storyboard-db-manage --config-file ./etc/storyboard.conf upgrade head'11:18
Zara___________________________________ summary ____________________________________11:18
ZaraERROR:   venv: commands failed11:18
Zarafull thing: http://paste.baserock.org/rulekeriza11:18
Zarabit weird, but I can now add worklists where I couldn't before because of errors about there being no table for permissions... (testing the permissions patch now)11:19
Zaraso seems to work, anyway11:20
SotKpretty weird11:20
Zarahm, creating a board seems to be a bit broken11:34
Zara(as in, seems to be locked and I can't edit it)11:35
Zaraworklists seem okay11:35
ZaraI got errors about it being unable to convert to a worklist11:35
SotK:(11:35
* SotK will have a look in a moment11:35
SotKdefault preferences have a $save() method, because they are automatically resolved on every single page by the root state11:36
Zara(it might just be that that patch depends on another one that it's not listed as depending on , not sure.)11:36
SotKso the check for if a preference is default or not is totally broken11:37
SotK\o/11:37
Zaraokay, so errors were just because I was clicking 'save' repeatedly too fast. but board not being editable is still an issue, and text still goes off the cards.11:45
* SotK wonders if pedroalvarez has time to test a fix for the preferences issue today11:46
SotKZara: what do you mean by "text still goes off the cards"?11:46
Zarahttp://imgur.com/ReMbhNu11:47
Zarathat's a newly-created board11:48
SotKI see :(11:48
* SotK will do something with overflow11:48
openstackgerritAdam Coldrick proposed openstack-infra/storyboard-webclient: Don't save default preference values  https://review.openstack.org/25235011:53
SotKpedroalvarez: I think https://review.openstack.org/252350 should solve the duplicate preferences issue, any chance you'll have time to test it please (since I still don't seem to be able to reproduce it)?11:55
*** mrmartin has quit IRC12:05
pedroalvarezsure!12:05
Zaraah, was about to say I can't easily test that one, cool12:05
pedroalvarezfeel free to test it too, but I wonder if you had also the issue that it solves12:06
Zarayeah, I didn't, that's why I can't easily test it12:06
ZaraI can check if it breaks other things but can't easily see if it works12:07
pedroalvarezdammit, I need to read more carefully12:07
Zaraheh, no problem12:07
pedroalvarezyou could try to use my way to reproduce it :)12:07
ZaraI like having a tidy database! :P12:07
pedroalvarezopen dashboard, delete rows from user_preferences table, open preferences page, kaboom12:07
ZaraI've got a lot of review, tbh, but I'll come back to it later if we need more people on it. for now I'm enjoying the fact that nothing has gone kaboom yet.12:08
pedroalvarezk, no worries :) I'm happy to test that and give some feedback12:11
Zara:)12:12
pedroalvarezSotK: tbh, I expected a fix in storyboard-api, given that it looks like a bad use of the API breaks the database12:13
pedroalvarezbut of course, I have no idea about the codebase12:13
Zara(btw, just went back to master of storyboard, and the non-editable board is editable again, so convinced it's the permissions patch that's to blame. The text still goes off the cards though.)12:13
Zarathat was for my issue from earlier, anyway.12:14
pedroalvarezSotK: with https://review.openstack.org/252350 nothing is created in the database12:18
pedroalvarez(when opening the preferences page)12:18
pedroalvarezwhich is what the patch says it does12:18
pedroalvarezModifying values after that generates the defaults and works good12:18
openstackgerritMerged openstack-infra/storyboard-webclient: Add a dashboard page for boards and worklists  https://review.openstack.org/23197312:27
persiaThis is probably a FAQ, but how long from merge until production deployment at s.o.o?12:34
SotKdepends on how busy zuul is12:35
SotKnormally about an hour or two on average I think12:36
Zarayeah, it seems to vary from around an hour to a couple of days, but I've never checked thoroughly.12:36
persiaIs it zuul's "post" queue?12:36
SotKyep12:37
openstackgerritMerged openstack-infra/storyboard-webclient: Fix checkboxes on preferences page  https://review.openstack.org/25200212:37
pedroalvarezI've seen it taking a bit longer than what the post queue said12:37
persiaExcellent.  So I can just watch http://status.openstack.org/zuul/ and see the jobs land.12:37
pedroalvarezthat is, the job in that queue finishes, and still the fix is not in production12:37
SotKyeah, I think there is a bit more to be done after the post queue, but I'm not entirely sure how the whole puppet thing works yet12:38
ZaraI know that sometimes tarballs don't get generated \o/12:38
SotKbut the post job creates the tarball which is then deployed by puppet12:38
pedroalvarezI tried to find out in the project-config repo, and didn't found any hint12:39
pedroalvarezZara: oh, thats bad, but I don't worry because my deployments depend on git :D12:39
persiapedroalvarez: Your deployment subscribes to the gerrit event feed, and runs master?12:40
pedroalvarezwell, I believe it's pulling from github, (maybe I should use gerrit instead) and installs that in the case of the API, and generates the files and put them in place in the case of the webclient12:43
pedroalvarezand yes, master12:43
SotKpedroalvarez: there is probably a fix that could be done in the api too, but I have no idea what causes the problem as it doesn't seem to happen for me12:43
persiaIf not gerrit, at least one of the git.o.o mirrors is more likely to receive useful support from the project if it isn't current.12:44
SotKand that patch causes the intended behaviour to happen for preferences anyway I think :)12:44
pedroalvarezSotK: yes it does12:47
pedroalvarezpersia: suggestion taken: https://github.com/palvarez89/ansible-role-storyboard/commit/1f7151bf365d6691d764a5e153221b1b864fbe3912:48
persiaUnless I'm reading that incorrectly, that polls.  Polling should be against git.openstack.org, rather than review.openstack.org.  If you want to consume review.openstack.org, you should do so via an event stream.12:49
pedroalvarezthat would be if I want it to run it whenever an event happens12:52
pedroalvarezI don't think I want that yet12:52
persiaMakes sense, so yeah, you want to use git.openstack.org, rather than review.12:52
persia(because the load on review is rather high, so only things that need realtime should not be using a mirror)12:53
pedroalvarezmakes sense12:55
* SotK realises the problems with the board permissions patch13:24
Zaraooh?13:25
SotKit is uneditable because the old UI doesn't understand the new API's permissions stuff13:26
SotKoops13:26
Zarahehe, I wondered if it was that but didn't really know how to check13:27
SotKalso, I can't recreate the breakage in the migration you had :/13:27
Zara(so I was lazy and moved onto looking at other patches for a bit.)13:27
Zara:/ well, it didn't seem to affect anything13:27
Zarabut it was weird.13:27
SotKcan you paste the output of `select * from worklists;` in your db?13:29
Zarasure, though it makes me look like a really weird person: http://paste.baserock.org/deruxoyena13:30
Zaraso going from the other paste, seems something went wrong at id:12, which I note has an updated_at where the others don't13:31
Zaraoh wait ignore me13:31
Zarathat's the line13:31
Zaragah13:31
pedroalvarezHello satna father christmas :)13:32
Zara\o/13:32
pedroalvarezI'm happy you found your dog :)13:32
Zara(12 and 13 have the same name, but I'd've thought that'd error at 13 if that were  the issue)13:32
Zarahaha, it's just a song that was stuck in my head13:33
* persia mumbles about http://paste.openstack.org/13:33
ZaraI don't even have a dog13:33
Zaratold you it'd make me look weird =D13:33
* Zara bookmarks paste.openstack.org13:33
ZaraI had baserock's one bookmarked so it was the first thing to come up when I put 'paste' in the address bar13:33
SotKZara: can you paste the result of `select * from permissions;` too please? :)13:34
* persia has a preference for using context-specific pastebins13:34
Zarahttp://paste.openstack.org/show/480630/13:35
ZaraSotK^13:36
* SotK wonders where on earth `| 1 | 2015-12-02 11:12:22 | NULL | edit_worklist_12 | edit_worklist |` came from13:38
SotKhmm actually, did you create that worklist before running the migration?13:40
SotKs/create/attempt to create/13:41
ZaraI'm not sure13:44
Zarathe timing suggests it13:44
SotKindeed13:44
Zarathat might've been the thing that reminded me to upgrade13:44
SotKand that would explain the partially created permissions13:44
SotKsince it creates the permission (edit_worklist_12), then tries to reference it in the worklist_permissions table that won't have existed yet13:44
Zarayeah, I remember partially creating one before it gave me an error because it didn't understand permissions, which reminded me to upgrade, so that fits13:45
SotKmeaning that the other permission wouldn't have been created (which also seems to be the case)13:45
SotKaha! mystery solved then :)13:45
Zarayup,  that's the earliest one today so guessing it's that one.13:45
SotKdoes this need a fix, given that it should be impossible to have such a situation in production since the migration will run automatically, before anyone tries to create things?13:46
Zarais it guaranteed to always work automatically?13:47
Zara(also, what does that mean for poor old worklist 12 at this point?)13:47
SotKZara: if you migrate down to 049, and then do `delete from permissions;` on your db, and then re-run the upgrade migration, it should be fixed13:49
*** mrmartin has joined #storyboard13:49
* SotK doesn't know what happens if a migration breaks in production13:49
SotKI'd imagine a very big mess13:49
Zaraokay. (yeah, I see poor little worklist 12 is currently 'not found'.)13:50
Zaraguessing they'd have to revert13:50
SotKbut then, I don't really want to wipe the permissions table in the migration, although it should already be empty13:51
SotK(and definitely is on storyboard.o.o)13:52
Zarahow would I migrate down to 049 and delete it from permissions? my mysql knowledge is pretty much 'I know how to login and show tables')13:52
SotKI've also run the migration on storyboard.sotk.co.uk against a dump of the production db from yesterday without any problems13:53
SotKZara: `tox -e venv "storyboard-db-manage --config-file ./etc/storyboard.conf downgrade 049"`13:53
Zarahahaha13:54
SotKthen connect to your database and run `delete from permissions;`13:54
Zarathe downgrade command is too sensible; I was expecting something less guessable, like the git commands13:55
SotK:D13:55
Zarashocked and appalled.13:55
Zaraooooohhhh: ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`storyboard`.`user_permissions`, CONSTRAINT `user_permissions_ibfk_1` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`))13:57
SotKis that when running `delete from permissions;`?13:58
SotKif so, do `delete from user_permissions;` first :)13:58
Zarahahaha13:59
Zara`delete from user_permissions;' worked, but `delete from permissions;` still didn't14:00
Zarabut this time board_permissions are the constraint14:00
Zaraso guessing htose also have to go14:00
SotKhmmm14:00
SotKdid the downgrade work?14:00
Zarait said it did14:01
Zaraubuntu@zara-storyboard:~/storyboard$ tox -e venv "storyboard-db-manage --config-file ./etc/storyboard.conf downgrade 049"14:01
Zaravenv develop-inst-nodeps: /home/ubuntu/storyboard14:01
Zaravenv runtests: commands[0] | storyboard-db-manage --config-file ./etc/storyboard.conf downgrade 04914:01
Zara______________________________________________________________________ summary _______________________________________________________________________14:01
Zara  venv: commands succeeded14:01
Zara  congratulations :)14:01
Zarait smiled at me, and everything14:01
SotKhmm, that should have deleted the board_permissions table14:01
SotKwhat does `select * from alembic_version;` say?14:02
Zara+-------------+14:05
Zara| version_num |14:05
Zara+-------------+14:05
Zara| 049         |14:05
Zara+-------------+14:05
Zara1 row in set (0.00 sec)14:05
Zarao.O14:05
Zarait seems right14:05
SotKbuh14:05
SotKI literally ran it about 10 minutes ago myself xD14:06
SotKthe `worklist_permissions` and `board_permissions` tables definitely still exist?14:07
Zarayup, 70 rows and 16 rows respectively14:08
SotKoh, it breaks for me now, but with an error14:09
Zara=D14:09
SotKthat's pretty weird14:09
SotKdo `drop table worklist_permissions;`, `drop table board_permissions;`, `delete from permissions;`, and I think it should be left in a state that the upgrade migration can handle14:10
Zaraokay14:10
Zaraall done14:11
Zaratime to upgrade again...14:11
SotKugh, my db is in a state after the thing that broke14:12
Zara:( the upgrade is working for me this time, at least14:13
SotKgood :)14:14
Zaraand I can edit worklist 12 without the world exploding14:15
SotK\o/14:15
*** mrmartin has quit IRC14:16
* SotK tests his fix to the downgrade issue he had14:16
SotKstill broken, oops14:17
* SotK wonders how on earth this worked for Zara14:17
SotKfsvo worked14:17
ZaraI don't know! :D14:17
Zarahttps://www.youtube.com/watch?v=iz6iENNnf0814:17
ZaraI think I switched back to master for the downgrade, then went back to the complex permissions branch for the upgrade14:19
ZaraI don't see why that'd make any difference to the downgrade, though.14:19
Zarait was just where I was at the time, so might as well mention it.14:20
SotKaha, that would explain it I think14:20
SotKsince there would be no downgrade from 050 to 049 in master14:20
Zarareally? how come?14:20
Zaraahhhh14:20
Zararight14:20
SotKseems dumb that it just sets the version rather than erroring though14:20
Zarayeah14:21
Zarasince that has helped to fix some dodgy understanding of it in my mind, which I'm now undoing14:21
Zaraoh well, I guess the fix is to fail to do the downgrade, then delete everything and 'upgrade' again14:22
Zaraand thus I have no idea if downgrading would work14:23
SotKdowngrading is entirely broken, I must have never actually tested it :/14:23
SotKoh, storyboard meeting in 20 minutes in #openstack-meeting!14:40
Zaraack14:41
SotKso it looks like the migration is secretly not working properly :/14:48
SotKZara: please can you paste the result of `select * from worklist_permissions;`?14:49
Zaranow I've upgraded again?14:49
SotKyeah :)14:49
SotKI want to see if it is broken for you too :P14:50
Zarahttp://paste.openstack.org/show/480643/14:50
SotKyep, looks broken14:50
Zarahm, seem to be duplicated14:50
SotKthere should be two per worklist14:50
Zaraoh, so just 39 breaks the pattern?14:51
Zara38, even14:51
SotKyep14:51
SotKfor some reason the very last permission doesn't get added properly14:51
Zara\o/14:51
SotKagenda for the meeting is here, feel free to add to it: https://wiki.openstack.org/wiki/Meetings/StoryBoard14:54
Zarathanks14:54
Zaraheh, that makes me feel bad; updated spec thing a bit this week but mainly been catching up on review/discovering how databases can do strange things14:55
* SotK fixes it with session.flush()14:57
SotKmeeting o'clock15:00
*** ChanServ has quit IRC15:34
*** thrace has quit IRC15:34
*** b3rnard0 has quit IRC15:34
*** davidlenwell has quit IRC15:34
*** cody-somerville has quit IRC15:34
*** paulsherwood has quit IRC15:35
*** lifeless has quit IRC15:35
*** SotK has quit IRC15:35
*** cody-somerville- has quit IRC15:35
*** dabukalam has quit IRC15:35
*** pleia2 has quit IRC15:35
*** persia has quit IRC15:35
*** ttx has quit IRC15:35
*** betherly has quit IRC15:35
*** jjardon has quit IRC15:35
*** coolsvap has quit IRC15:35
*** krotscheck has quit IRC15:35
*** NikitaKonovalov has quit IRC15:35
*** Zara has quit IRC15:35
*** Zara_ has quit IRC15:35
*** gothicmindfood has quit IRC15:35
*** tlbr has quit IRC15:35
*** pedroalvarez has quit IRC15:35
*** rainya has quit IRC15:35
*** wendar has quit IRC15:35
*** pleia2 has joined #storyboard15:37
*** thrace has joined #storyboard15:39
*** b3rnard0 has joined #storyboard15:39
*** davidlenwell has joined #storyboard15:39
*** ttx has joined #storyboard15:39
*** pedroalvarez has joined #storyboard15:40
*** persia has joined #storyboard15:42
*** betherly has joined #storyboard15:42
*** jjardon has joined #storyboard15:42
*** SotK has joined #storyboard15:43
*** rainya has joined #storyboard15:43
*** wendar has joined #storyboard15:43
*** NikitaKonovalov has joined #storyboard15:53
*** cody-somerville has joined #storyboard15:59
*** paulsherwood has joined #storyboard15:59
*** lifeless has joined #storyboard15:59
*** cody-somerville- has joined #storyboard15:59
*** dabukalam has joined #storyboard15:59
*** cody-somerville has quit IRC16:09
*** paulsherwood has quit IRC16:09
*** lifeless has quit IRC16:09
*** cody-somerville- has quit IRC16:09
*** dabukalam has quit IRC16:09
openstackgerritAdam Coldrick proposed openstack-infra/storyboard: Implement complex permissions for worklists and boards  https://review.openstack.org/23547216:09
*** tlbr has joined #storyboard16:34
*** gothicmindfood has joined #storyboard16:34
*** Zara_ has joined #storyboard16:34
*** Zara has joined #storyboard16:34
*** krotscheck has joined #storyboard16:34
*** coolsvap has joined #storyboard16:34
*** cody-somerville has joined #storyboard16:34
*** paulsherwood has joined #storyboard16:34
*** lifeless has joined #storyboard16:34
*** cody-somerville- has joined #storyboard16:34
*** dabukalam has joined #storyboard16:34
SotKZara: are you alive?16:44
*** cody-somerville has quit IRC16:45
*** paulsherwood has quit IRC16:45
*** lifeless has quit IRC16:45
*** cody-somerville- has quit IRC16:45
*** dabukalam has quit IRC16:45
*** coolsvap has quit IRC16:45
*** krotscheck has quit IRC16:45
*** Zara has quit IRC16:45
*** Zara_ has quit IRC16:45
*** gothicmindfood has quit IRC16:45
*** tlbr has quit IRC16:45
*** dabukalam has joined #storyboard16:46
*** cody-somerville- has joined #storyboard16:46
*** lifeless has joined #storyboard16:46
*** paulsherwood has joined #storyboard16:46
*** cody-somerville has joined #storyboard16:46
*** coolsvap has joined #storyboard16:46
*** krotscheck has joined #storyboard16:46
*** Zara has joined #storyboard16:46
*** Zara_ has joined #storyboard16:46
*** gothicmindfood has joined #storyboard16:46
*** tlbr has joined #storyboard16:46
Zarahey there16:48
SotK\o/16:49
Zarawhat did I miss?16:49
SotK15:44:32 -!- Irssi: Join to #storyboard was synced in 51 secs16:50
SotK16:09:42 < openstackgerrit> Adam Coldrick proposed openstack-infra/storyboard: Implement complex permissions for worklists and boards16:50
SotK                            https://review.openstack.org/23547216:50
SotK16:44:20 < SotK> Zara: are you alive?16:50
Zara16:42 < Zara> my sources tell me that SotK is now in the same channel, even though nothing has come up on my screen16:50
Zara16:42 < Zara> apparently you're on a swedish server16:50
Zara16:43 < Zara> hm, though actually, I get him with a /whois but /who is still showing nothing16:50
Zara16:43 < Zara> mysterious.16:50
Zara16:44 < Zara> he can see me with /who but not my messages16:50
persianetsplits are fun :)16:52
ZaraI had a party while we were in different channels16:52
Zaranobody else came to the party and it was sad.16:52
Zarawell, on different servers that weren't talking to each other in the same channel16:53
SotKso this "uneditable boards" thing is a bit of a mess16:53
SotKsince the API sends an array now, and you need to pass a flag to angular's $resource if that is the case16:54
Zara:D16:55
SotKI wonder what happens if you set that flag and don't pass an array...16:56
Zaraoh, I'm sure it probably makes every past and future patch work perfectly16:56
Zarait's a programming secret; don't tell anyone.16:57
ZaraPS: sorry for ruining your life by finding these bugs; I have a spare openstack marketing expo rubber duck if you want one.16:58
SotKthat's OK, its better to find these things now that straight after we merge things :)16:58
SotKah, the same thing happens but with the words "array" and "object" swapped17:00
SotKIn that case I don't have a clue how we can smoothly transition17:01
*** ChanServ has joined #storyboard17:04
*** wolfe.freenode.net sets mode: +o ChanServ17:04
* SotK suggests merging them both in quick succession, given the alternative is hardcoding permission levels even more than they already are17:07
* SotK gives up and goes home to fly a pretend spaceship to the pretend moon instead17:08
*** b3rnard0 is now known as b3rnard0_away17:45
Zarasleep can only help. no idea where today has gone.17:47
Zarastarted sketching out roadmap at the bottom, a bit. I probably can't procrastinate much longer from formatting the wiki page properly instead of cheating with <pre>17:48
pedroalvarezheheh it needs some formating :)17:54
pedroalvarezwhy are you using <pre> tags OOI?17:54
*** b3rnard0_away is now known as b3rnard018:23
SotKput it in a story so you can just use markdown :)18:25
*** jjardon has quit IRC19:59
*** jjardon has joined #storyboard20:03
pedroalvarezAhh, makes sense :)22:13

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!