-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pull changes from dev to production on 2014-05-27 #899
Conversation
Shaded the login header, changed the text on the front page, and dynamically swapped out the favicon.
Switched site config from API call to a static javascript object.
Implemented as persistent cookies via Env methods. Added jquery.cookie.js to facilitate managing them. Used to hide images on the game page and to put the page into compact mode, respectively.
With a button to un-hide it, retaining the previous selections.
BMInterfaceNewuser now verifies that username and email address are acceptable lengths, the UI limits the length of those input fields, and the form is hidden after you're done with it.
689 Add color to overview page
Restricted mood values to standard die sizes
Added mad swing skill
pull changes from master to dev on 2014-05-13
Account creation validation and form-hiding
Highlight and resized chat
Fixed QUnit tests
Load all javascript dynamically
pull changes from master to dev on 2014-05-21
…on player action and page access
User activity timestamps
Base chat highlighting on active activity
pull changes from master to dev on 2014-05-24
pull changes from dev to production on 2014-05-27
Applying database changes: after "vagrant provision":
This tested out fine under vagrant. |
This wasn't good enough because of changes to the views which were not reflected in updates. After i updated using:
i got a PDO error loading any game because of:
I shut down apache to try to fix it, and of course made things worse because i was working without a script in the database directory, not the updates directory, so i accidentally clobbered the "game" tables entirely:
I then restored everything from the database backup i took after applying the previous updates, which should not have lost any data, recreated all the views (they should all be disposable, and "during an outage" is a bad time to go check which two i actually need), and restarted apache:
Here's the diff between the "post" and maybefixed" versions:
Are those "utf8" changes any cause for alarm? I think i'll wait and see if anyone complains. According to the apache log, i'm the only who saw SQL errors while the database was up but in a bad state. I don't think anyone could have advanced any games while the DB was up and in a bad state, so i don't think we lost any game data. I can also see from the backup that no player creation events happened to occur during that time. Could someone have created a game and lost it? Potentially, yes, but the apache logs show no activity from anyone except me after 11:24:24 UTC. So i think we're safe, but i still see no activity from anyone except me in the logs, so i'm going to hang onto this until someone else advances a game. |
A second player successfully accessed the site, but i'm going to be nervous until i see more activity. Is it low right now because the new site is not very active yet in the early morning U.S. time, or is it low right now because people are seeing errors? Standing by. |
In terms of post-mortem, i'd say two things: The important one is: the way we communicate about database updates which need to be pushed out during site updates is by putting files in deploy/database/updates/. We should treat this as the only valid way to communicate about database updates --- in this case, the original pull which changed the views contained text in the pull request saying to rerun the views. When i initially approved that pull and updated dev, i was looking at that pull request and its text. Today, i wasn't. Demonstrably, if there's no updates file, database updates get botched. So, yes, i think that means if you need to reload a view, you need to copy/paste the contents of the views file into a file under updates. This shouldn't lead to relevant bitrot, because updates only matter until they're applied. So: as a pull submitter, if you're changing databases, make sure all changes are reflected in updates/ SQL files. As a pull approver, don't accept pulls if they have database changes which are missing from updates. Secondarily: i didn't catch this, even though i tested the database changes by hand in vagrant, because my test suite wasn't rich enough --- i created some players and tested that the updates didn't blow up, but i didn't create any games or seriously traverse the UI. But that's always going to happen --- by-hand testing is a pain, and stuff will fall through the cracks. Odds are, whatever actually broke in any particular update will be whatever i happened not to test that time. So IMO we should stick with the first lesson --- the way we communicate about database updates which need to be pushed out during site updates is by putting files in deploy/database/updates/, period. Any objections? |
This update brings these pulls, already on dev, to production:
Database updates: