mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] dw_dev2012-09-22 09:49 pm

Release notes

We did our first release from git tonight. It went well, I will chalk that up to all of the hard work from folks like [personal profile] fu and [personal profile] exor674 (and others!) to make sure that everything was in place. [personal profile] fu put together a nice "things we have to do" in [site community profile] dw_staff, so that was very helpful.

Anyway, I wanted to document some things that are important to know for the period between releases. This probably won't apply to most of you, but just in case...

So, we are following the document about a successful git branching model. This is what git flow is based on and it's a really efficient model, so we're using it for doing our features and in this case, our release.

The release process was, in essence:

  • Create a release-1.11.0 branch
  • Make final tweaks in this branch to get things ready for release
  • Push this branch live
  • Merge this branch back in to develop and master
  • Add a release tag with the version number on master

This leaves our repository in this state:

  • develop is still open, you can keep committing things to it (no code freeze, yay!)
  • master has stable tags, so you can always roll back to tags here (easy production rolls!)
  • release-1.11.0 is open for doing fixes on the live release (easy fixing production, yay!)

The thing that is important to know, if you are going to be committing fixes that you intend to go live, is that you need to make your changes on the release-x.xx.x branch -- not on develop. Any code committed to develop will, because of its nature, have to wait until the next code push -- weeks away.

If you have stuff you need to get live sooner (fixes to things broken in the last code push or stability/important fixes), you need to adjust your workflow slightly. It's pretty easy though, and goes something like this:

git checkout -b release-1.11.0 dreamwidth/release-1.11.0

Now make your fixes, as per normal, and submit a pull request. As long as your current branch is the release branch, then you will be able to submit a pull request on the appropriate branch, and we can merge it in and push it out to the site quite easily.

ninetydegrees: Art: comic strip of a woman, afraid and crying (tear)

[personal profile] ninetydegrees 2012-09-23 04:28 pm (UTC)(link)
No I still get the !rejected error when updating repos and the code you gave Yvi didn't work. At this point I think I don't know what to do except rebuild my whole hack but I've been trying to make this work all afternoon so I'm currently playing a little Glitch to go back my zen state. /rambling.
ninetydegrees: Art: heart (love)

[personal profile] ninetydegrees 2012-09-23 05:31 pm (UTC)(link)
Oh please go ahead! Thank you!
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-09-23 08:38 pm (UTC)(link)
Yeah I saw it wasn't right: the network graph is really useful for that but the stupid merge is what happens when I run dwu. Otherwise, I had the same setup at the beginning that I have now that I ran the commands you gave me. I don't know why it does that. I'm gonna run dwu again.

Edit: ran it again and it keeps happening. I get that frakking merge thing I pasted above.
Edited 2012-09-23 20:41 (UTC)
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-09-23 08:43 pm (UTC)(link)
Oh sorry I pasted it above too. Let me find it... Yeah right here: http://dw-dev.dreamwidth.org/124621.html?thread=1024717#cmt1024717.

Edit: it's from http://wiki.dwscoalition.org/wiki/index.php/Dev_Maintenance#dwu_-_Updating_the_repos. I've never had any problems with it before.
Edited 2012-09-23 20:44 (UTC)
ninetydegrees: Text: let's make better mistakes tomorrow. (mistakes)

[personal profile] ninetydegrees 2012-09-23 09:02 pm (UTC)(link)
For the record, I was always in develop (I check before I do anything) but I'll try this.
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-09-23 09:09 pm (UTC)(link)
Okayyyyyyyyyy. That makes sense. Sorry I'm so slow! ;)
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-09-23 09:07 pm (UTC)(link)
Could you check that my repos are correct before I do anything else please?
ninetydegrees: Art: floating cute creatures and hearts (cloud 9)

[personal profile] ninetydegrees 2012-09-23 09:20 pm (UTC)(link)
OMG no error message! No merge! *mwah* Thank you so much. I can work now! Yay! Thanks again.
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-09-24 07:00 pm (UTC)(link)
Ok I'm not sure everything's alright today. my non-free seems to match dw's non-free but I'm not sure my free does. Both graphs look different for develop and I get "Your branch is ahead of 'dreamwidth/develop' by 18 commits." and "Your branch is ahead of 'dreamwidth/master" by 5 commits.' when I update. :/

Edit: I could reset things so they match thanks to the code you've give me above and dwu didn't give me any warnings this time but I still don't understand why this happens and I have to keep doing that. I'm not doing anything. I haven't created any branch or done any coding. I just open my software and pull updates with dwu.
Edited 2012-09-24 19:10 (UTC)
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-09-24 07:54 pm (UTC)(link)
I did that only after I'd 'fixed' my free repo. I hadn't done anything before that. Hadn't even loaded PuTTY (terminal I use on Windows) since yesterday. I just ran it, entered my password, switched to LJHOME, checked which branches I was on (develop) then ran the dwu script. It fetched some changes (I can't remember what it said but I didn't expect things to go wrong then so I didn't pay too much attention :/). Updated the database. Ran dwu again and that's where I got the 'ahead' messages.

This is my dwu script:

#!/bin/bash
stop-apache

cd $LJHOME

# pull changes from dreamwidth
git checkout develop
git pull --ff dreamwidth develop
git checkout master
git pull --ff dreamwidth master

# push them to Github forks
git push origin develop
git push origin master

# change to dw-nonfree
cd $LJHOME/ext/dw-nonfree

# pull changes from dw-nonfree
git checkout develop
git pull --ff dreamwidth develop
git checkout master
git pull --ff dreamwidth master

# push them to Github forks
git push origin develop
git push origin master

start-apache

This is my dwdb script:

#!/bin/bash
$LJHOME/bin/upgrading/update-db.pl -r -p --innodb && \
$LJHOME/bin/upgrading/update-db.pl -r --cluster=all --innodb && \
$LJHOME/bin/upgrading/texttool.pl load
Edited (sorry; english is hard now) 2012-09-24 20:09 (UTC)
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-09-24 09:01 pm (UTC)(link)
Sorry I was unclear: that was before I did all that.

I did all the steps I mentioned in my previous comment. When I saw the 'ahead' message and my graph didn't match the one for dreamwidth/dw-free I did this:


git checkout develop
git fetch dreamwidth
git reset --hard dreamwidth/develop
git push --force origin develop

git checkout master
git fetch dreamwidth
git reset --hard dreamwidth/master
git push --force origin master

Checked my branches, my graph, ran dwu to make sure everything was ok and it was then. That's when I created the release branch to fix a bug in Librarian's Dream. So everything is fine now but it wasn't before. And I don't understand why because I hadn't done anything on my end. So now it feels my repos are going to keep 'breaking' every time I fetch updates.
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-09-24 09:06 pm (UTC)(link)
No, I had the new version. Have had it since yesterday.

And it was only the free repo this time, not the nonfree one.
Edited 2012-09-24 21:06 (UTC)
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-09-24 09:10 pm (UTC)(link)
Ok. I've expanded the number of lines I can scrollback to in case this happens again.

(no subject)

[personal profile] ninetydegrees - 2012-09-26 17:59 (UTC) - Expand

(no subject)

[personal profile] ninetydegrees - 2012-09-27 15:32 (UTC) - Expand

(no subject)

[personal profile] ninetydegrees - 2012-09-27 16:28 (UTC) - Expand