-
Notifications
You must be signed in to change notification settings - Fork 2
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
define production workflow #8
Comments
Seems reasonable to me, it could be nice to have a staging environment. We might consider, instead of creating a |
That works too! |
IMHO
That being said, whatever makes sense to the group is fine by me! |
In my understanding, SVN traditionally has a workflow where development is done in the main branch (called "trunk"), which meant that trunk might not be stable and you wouldn't necessarily be able to build trunk until all the bugs were worked out. Stable releases are produced by creating a new release from a previous stable release, then cherry-picking the desired changes for that release from trunk and pulling them into the new release. Whereas the GitHub approach had traditionally been to consider the "master" (or "main") branch as the current stable build of a project, features are tried and tested in feature branches. And here there are two approaches: pull features directly into "main" (which therefore isn't necessarily the latest stable release, until features have been fully tested in the main codebase), or pull features into a "development" branch. In the last approach, you guarantee that "main" is always stable: new features are pulled into the development branch which isn't guaranteed to be stable until the features have been fully tested, and only after testing and bugfixes, the "development" branch is then merged into the "main" branch which will be the new stable build. And a snapshot of the main branch at this point will be created as a new release. What I like about this last approach is that the main branch is always guaranteed to be buildable. So that is a new developer joins the project a ways down the road, and tries building for the first time off of "main" , they won't be discouraged by build errors due to a non stable branch |
OpenOffice for example had an SVN repo (only recently did they move to GitHub, smart move in my opinion). When in the past few years I tried to do my first builds of OpenOffice off of trunk, I would get quite discouraged by running into numerous errors, and I thought it was just me not having enough experience in doing builds. Until I realized: trunk isn't stable and can have bugs. If you want to do a build that succeeds, you should start from the latest stable release. Whereas when participating in projects on GitHub, I saw that they made better use of branches for development rather than just tags for releases, so that development could be done in branches before being merged into the main "currently stable" codebase. This made so much more sense to me and made it easier for newcomers to join and start building right away. As for reverting a change, the idea of having a "development" branch as a filter before merging into "main", is to test features as much as possible, so that they are only merged into main when there is a certainty that they will contribute to the project, and should not have to be reverted. You can always revert in the development branch before merging to main. Once you have merged to main, you are guaranteeing that that feature will be a part of the project, so there should be an idea of "no going back". Reverting after merging to main becomes more complex, but it shouldn't have to happen if the features have been fully tested first. If for any reason something does need to be "reverted" after merging to main, there should rather be a fix that is pushed down from development to main, rather than trying to revert from main backwards |
I would argue that when you merge into |
I'm a huge fan of https://trunkbaseddevelopment.com/. Which is roughly in line with what @mftruso outlined above (though some bits of those suggestions are for projects much bigger than ours). I agree that CI (which we don't currently have, but which I can set up) can ensure that main is always "buildable" (in our case, tests pass and rails starts). In general, you can make a branch and do as much work there as you want to as long as PRs are opened against |
Yeah that would work, if we can have CI put into place that would be great. That's how projects like WordPress / Gutenberg handle their projects, they also use "main" as the development branch as long as each PR passes the CI tests. I'm up for that! Though I'm no expert in setting up CI tests, so if anyone knows how to do that, that would be great |
CI is in place! See #15 |
Once we have a skeleton app up and running, perhaps it would be useful to create a development branch, so that all development would be merged first into the development branch, and when a number of significant features have been added and tested they can be then merged to the "main" or production branch.
I could then create a vhost for staging, which would be synced to the development branch, so that there can be a "production ready" website and a "staging" website. Features can pass through the staging website before being pulled definitively into the production website.
The text was updated successfully, but these errors were encountered: