Wont Main break all the time, if your team commit straight to it?
Posted by martindukz@reddit | programming | View on Reddit | 5 comments
Posted by martindukz@reddit | programming | View on Reddit | 5 comments
Buttleston@reddit
To be clear almost no one advises commiting directly to main. While working on a bug or feature, you have a short lived branch that you commit to. You can run tests on it, etc. You open a PR, someone reviews it, if it passes all the CI/CD tests, THEN you merge it to main
nosayso@reddit
Yep, highly advise not merging to main (assuming that's the branch you release from) until you're ready to release the code to production. This keeps some new feature you may not be ready to release yet from getting in the way in a case where you need to do a production bug fix.
over_here_over_there@reddit
No.
TBD works just have to be careful. The hardest part is convincing upper management that you want to do TBD with feature flags. And they go “but what about our 3 month release cadence with 2 weeks of testing in prod????”
todo_code@reddit
TBD is great. On PR to main run as many tests/sanity checks you can, after merge deploy to non prod, run all e2e tests with some hand tests by devs or PO with and without feature flags. Deploy to prod with canary and those feature flags. Monitor. Next week remove feature flag.
Personally, I hate feature flags, it's not hard to make changes backwards compatible. We should all be aware of the complexity of what we are trying to accomplish, and how to do so iteratively. Several of the past major cloud outages were feature flag/config related.
goomyman@reddit
This sounds no different than just work in small releasable chunks and have a CI/CD pipeline off main. Which is just very standard… although most teams don’t like off hours anytime prod releases - it makes support difficult and it’s nice to have peace of mind that deployments can break you at anytime.
Until I real this part that sounds Iike a nightmare “Unfinished work will be part of main, so it is often important to isolate it.”
Please don’t put unfinished work in main. I mean I get shipping features in parts - maybe even features that don’t do anything yet. But true unfinished, untested work. Just why. Are you going to put everything behind feature flags - your going to be feature flag hell really quick.