-
Notifications
You must be signed in to change notification settings - Fork 27
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
Consider developing more in branches #222
Comments
@samreid and I are very excited for our discussion tomorrow! Here are some notes from a discussion we had today about branches. One central question we had was "What would it look like if we wanted to move Buoyancy development to a branch today." Some more discussion questions:
Notes on how to do testing:
|
FYI - I am interested in the github issue <-> branch relation. I've used it in the past to understand the status of an issue by following the link to the branch and comparing it to main (in our case). This is also helpful for compiling release notes depending on the relation between issues/branches and releases.
|
Also a question: since we are discussing feature branches here, does that mean discussion on other branches (hotfix/bug/qa/release) would be follow-on conversations? |
I did some googling as @pixelzoom recommended in slack and found some really useful resources.
|
5/7 Meeting Summary: The meeting focused on discussing branching strategies for development within the PhET project. The team brainstormed ideas, identified concerns, and planned for subteams to start using branches in some form. Here are the key points discussed: Github flow vs. Trunk:
Benefits of Branches:
Concerns and Questions:
Proposed Solutions and Ideas:
Action Items:
Overall, the team emphasized the importance of keeping branches short-lived and discussed transitioning from commit-based concerns to merge-based concerns in development processes. Further meetings were planned to address specific concerns and finalize branching strategies. |
Some notes to jog my memory for Thursday's conversation: Prefer short-lived branchesOn Wednesday I asked @marlitas about long vs short-lived branches. @marlitas referred to this section https://trunkbaseddevelopment.com/youre-doing-it-wrong/#duration-of-short-lived-feature-branches which says:
Thanks for helping me understand that better, that makes perfect sense. This also overlaps with a proposal @zepumph described (if I understood correctly), where there would be a long-running "development" branch. If I understand correctly, that proposal shares commonalities with the Gitflow workflow described here, where most work is done in the "develop" branch and merged to main at checkpoints: https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow. However, that section is guarded with the caveat:
Therefore, it seems that the feature branches proposal described in https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow is the most promising. Main is stableThe main theme of our discussion has been to increase the stability of the main branch, by pushing higher-quality less-frequent changes to main. I believe this is related to the problem we worked on in phetsims/tasks#1106. CT being green is not a sufficient condition to main being stable, but it is a necessary condition. I don't know of any of our tests that are overly sensitive (like an assertion or failure that is "ok"). Our team is kind of using main as a way to invoke testing on CT. Like "things are working well in my working copy, let's see what CT says about it". But in order to do that, we have to push to main, thus destabilizing main. Maybe one way to describe the instability of main right now is: if common code has received one push that hasn't yielded a solid green column, main is unstable. So we will need a way to better test things before they get to main. Maybe the gitflow "develop" branch was supposed to be one way of doing that? But I think we should look for other ways. |
I used a short-lived feature branch for the development of phetsims/density-buoyancy-common#121 and it went very well. A brief summary of my process:
I could have also left the changes in the branch for the code review. I was also surprised there was no evidence of the deleted branch afterwards. This was a straightforward process and worked well for this "hello world" ultra-simplistic use case. |
Brainstorming one more "stepping stone" idea before we work out our long-term solution. We could develop a notion of "unstable" on CT. For instance, if code has been pushed to main that has not yet yielded a solid green column, then we would consider main "unstable". In that case, team members would be warned to "pull at your own risk". Once new code has been pushed to CT and has yielded a green column or two, then we could consider it pullable. Of course it would be nice to supplement this with other testing (more thorough than precommit hooks) so code can already be stable by the time it lands on main. Just an idea. |
Last week we decided to try a branch naming schema like: Today @samreid @AgustinVallejo and I found that our currently decided on branch naming (with path slashes) looks awkward in the git branches dialog of Webstorm. It creates directory structure that results in more key presses. And it results in feeling like you are checking out a branch named as just the issue number. Instead we recommend changing this to |
That general form hurts my brain. It's almost the same thing, but how about For example:
|
The recommendation above has inconsistencies and it is unclear what is meant. "how about" has "_" but the example has "/". The how about has issueRepo as camel case but in the example, it is hyphenated. |
Sorry, I mean
|
We would like to consider working on feature branches instead of doing all development on the main branch. We are planning on a brainstorm discussion for this. This issue is to document thoughts about what this process change would entail.
To get started, here are some benefits of working in feature branches:
not get pushed to the main branch or make it to production.
Here are some potential drawbacks of working in feature branches:
Here are some questions that need to be answered.
who is responsible for that?
of dependencies while common code repos can continue to progress. (This sounds complicated, I am just brainstorming).
The text was updated successfully, but these errors were encountered: