[Proposal] Feature branch development
See original GitHub issueFeature branch development for long running features seems to be the preferred way for collaboration between different contributors. It also raises some concerns about code quality and PR size (when merging to main). While our initial attempt at this development model realized these concerns and halted further feature branch development, this proposal aims to address those concerns with an alternate workflow.
We can use a hybrid of the feature branch development model and the Continuous integration development model [1]. We reintroduce feature branch development with the following safeguards:
- High frequency integration: We raise PR’s to
main
not once the feature is complete, but whenever we reach the closest integration point during development. e.g. once the plugin is bootstrapped, or a core feature is complete. we also frequently rebase changes frommain
back into the feature branch (Thanks @kavilla for calling this out) a. This makes the integration frequency much higher allowing us to catch integration issues much quicker. b. This still lets collaboratively develop on a big feature that is not ready formain
- Treat feature branch PR’s the same as PR’s to main. i.e. CI is run on all PR’s, no incomplete work should be merged, Tests are necessary for all PR’s etc.
a. This maintains the code quality going into each feature making the integration to
main
PR’s much easier and quicker b. More visibility during development since it gives reviewers the necessary time to review each PR. - Feature specific labels: This helps identify feature related issues and PR’s. (Thanks @joshuarrrr)
This should address the main concerns raised during the initial few features that were developed using this flow. We can experiment with this model for a few features before committing to it too since development without it seems to be difficult at the moment.
[1]Ref: https://martinfowler.com/articles/branching-patterns.html
Issue Analytics
- State:
- Created 10 months ago
- Reactions:2
- Comments:9 (9 by maintainers)
Top GitHub Comments
I like it! For the feature branch we can also call out that merge PRs from
main
can be made into the feature branch to keep it up to date as possible. Also, enforces the tests as a requirement instead of tests as an after thought. Thanks @ashwin-pc for making this.yeah, that’s a tradeoff that we are experimenting with. The hope is that the initial tradeoff will result in much smoother development as the feature progresses and save time when the merges to main needs to occur. It will also help guide some of the foundational changes made for the feature w.r.t how it integrates with dashboards since that’s where it most likely that less than ideal decisions might be made due to gaps in our documentation.