Continuous Integration vs Feature Branch Workflow

  Переглядів 184,664

Continuous Delivery

Continuous Delivery

День тому

🎁🎄🌲🌲🌲🌲🎁🎄🌲🌲🌲🌲🎁
HAPPYCDNEWYEARFOR2024
🎁🎄🌲🌲🌲🌲🎁🎄🌲🌲🌲🌲🎁
Continuous Integration and Feature Branching are both very popular ways of organising work in a development team, but they are mutually exclusive for most cases. This is counter to what many, maybe most people think. In this video Dave Farley explains the difference and why the two are largely mutually exclusive, and then explains how to live in the CI world by describing three different approaches to keeping the software working as it evolves.
Software engineering, any engineering, is all about trade-offs, the trade-off at the heart of CI is that to avoid conflicts our aim is to integrate our code with that of our co-workers as close to “continuously” as we can, that means that we can’t afford to wait until we are finished. If we take that idea one step further into Continuous Delivery, then every change may end up being deployed into production, so we need to grow our software, through many small changes, committing multiple times per-day, and be comfortable that, at any point in that process, the software may be released into production. How do we use ideas like dark-launching, branch-by-abstraction and feature-flags to help?
RERERENCES:
Trunk Based Development ➡️ trunkbaseddevelopment.com/
Read More About Branching ➡️ martinfowler.com/articles/bra...
-------------------------------------------------------------------------------------
🎓 CD TRAINING COURSES 🎓
If you want to learn Continuous Delivery and DevOps skills, check out Dave Farley's courses
➡️ bit.ly/DFTraining
📚 BOOKS:
📖 Dave’s NEW BOOK "Modern Software Engineering" is now available on
Amazon ➡️ amzn.to/3DwdwT3
In this book, Dave brings together his ideas and proven techniques to describe a durable, coherent and foundational approach to effective software development, for programmers, managers and technical leads, at all levels of experience.
📖 "Continuous Delivery Pipelines" by Dave Farley
paperback ➡️ amzn.to/3gIULlA
ebook version ➡️ leanpub.com/cd-pipelines
📖 The original award-winning "Continuous Delivery" book by Dave Farley and Jez Humble
➡️ amzn.to/2WxRYmx
📖 "Extreme Programming Explained: Embrace Change", Kent Beck ➡️ amzn.to/2GpQRjE
📖 "Accelerate, The science of Lean Software and DevOps", by Nicole Fosgren, Jez Humble & Gene Kim ➡️ amzn.to/2YYf5Z8
📖 "The DevOps Handbook", by Gene Kim, Jez Humble, Patrick Debois & John Willis ➡️ amzn.to/2LsoPmr amzn.to/2LsoPmr
-------------------------------------------------------------------------------------
📧 JOIN CD MAIL LIST 📧
Keep up to date with the latest discussions, free "How To..." guides, events and online courses, and get Dave’s FREE guide on “Continuous Integration Top Tips” here ➡️ www.subscribepage.com/howto-c...
Dave Farley's Blog ➡️ bit.ly/DaveFWebBlog
Dave Farley on Twitter ➡️ bit.ly/DaveFTwitter
Dave Farley on LinkedIn ➡️ bit.ly/DaveF-LI

КОМЕНТАРІ: 931
@Crozz22
@Crozz22 3 роки тому
This assumes all my changes are always incremental. In practice I often tear down most of what I did after I've cemented the general idea. To introduce my initial ramblings to the team before I even know if it's the direction I want to go, sounds like a whole lot of work for nothing.
@_skyyskater
@_skyyskater 3 роки тому
Great point, but you can still do CI here. If you plan on throwing away the branch, that doesn't count and is totally fine to take your time on it. Just be aware things could change during that time. Create your "draft" branch, do your thing, then when you are satisfied and ready to write it for real, check out a new fresh branch and do your changes there. Then commit and submit PR. Done.
@MidnighterClub
@MidnighterClub 3 роки тому
I've worked for a large firm (close to 100 developers) and we were divided into smaller project teams (10 to 20 people) each responsible for a particular feature set and launch window. "Assumes all changes are incremental" is the problem here. Large changes are not useful to the rest of the team until they are completed, or at least nearly complete (ready for system testing). Working on a branch gives the project team time get their stuff into a usable state, then it gets merged with top of tree, but not before.
@_skyyskater
@_skyyskater 3 роки тому
@@MidnighterClub You can break work into smaller pieces. It doesn't have to be useful to merge, it just can't cause regressions.
@JD-mz1rl
@JD-mz1rl 3 роки тому
Work on your local branch and don't push to origin until it's ready. When complete, do interactive rebase, fixing up all the irrelevant commits into one (or as many as logical), then PR that set of logical commits.
@_skyyskater
@_skyyskater 3 роки тому
@@JD-mz1rl That only works if much hasn't changed, or if your changes aren't massive. If this is working for you, then either your team is probably already breaking things down small enough (good), your application/team hasn't really scaled yet, or you aren't making many big changes.
@Thejasonlessard
@Thejasonlessard 3 роки тому
How do you do code review before a commit to the main branch if you are not branching and submitting merge requests ?
@m.x.
@m.x. 3 роки тому
Having a dev branch from which you can create one single, big PR to be merged into master? Not sure tbh
@ultrasoft5555
@ultrasoft5555 3 роки тому
I guess with the more frequent merges team members are more aware of the work of each other. And smaller, daily merges mean quicker reviews. Merge requests are not the only way to review code, anyone at any stage of the development can just read the diffs. Maybe reviewing is also better if continuous.
@whitewittock
@whitewittock 3 роки тому
what do u mean, you don't need to commit changes to create a code review you can use something like Code Collaborator to make a code review based on your local changes
@johnkeck
@johnkeck 3 роки тому
Code review does seem rather more complicated in the CI context.
@SuperSlugger94
@SuperSlugger94 3 роки тому
Gerrit accomplishes exactly what you are asking. You push your commit to the main branch but Gerrit does not push it to remote origin until it has been reviewed.
@msintal1308
@msintal1308 3 роки тому
Im not even a programmer but, I'm loving this channel. Found it through Cyberpunk criticism. Very fascinating!
@thereal_maximg
@thereal_maximg 3 роки тому
cool, don't stop learning
@MrThogin
@MrThogin 3 роки тому
Me too...
@kaitsurugi3280
@kaitsurugi3280 3 роки тому
Me three! :D
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Glad you enjoy it!
@destroyonload3444
@destroyonload3444 3 роки тому
Sounds like your destined to become a programmer...
@adityaprakash5093
@adityaprakash5093 2 роки тому
We changed our process after this video few months ago and that instantly solved lot of code conflicts problems that we were facing and allowed us to visualize the progress of the day. Thanks a lot for the content
@ContinuousDelivery
@ContinuousDelivery 2 роки тому
Thanks for the feedback, I am pleased that you found this helpful.
@CottidaeSEA
@CottidaeSEA 2 роки тому
The definition of continuous integration sounds like 10 developers coding live on the same computer but with different keyboards.
@Martinit0
@Martinit0 2 роки тому
It's like working together on a Google Doc
@aprilmintacpineda2713
@aprilmintacpineda2713 3 роки тому
As someone who has experienced both sides, I can say that there's no perfect solution, it's basically a "pick your poison" situation.
@bartdart3315
@bartdart3315 2 роки тому
So true.
@RadioWhisperer
@RadioWhisperer 2 роки тому
Especially true as one thing that's missing from this approach is code review. If every developer on a team integrates every day that's 1 code review for 2 or 3 other people every day. Granted they're small changes but reviewers have to understand the big picture behind changes, otherwise all they're doing is reviewing syntax variation and coding style. A big part of review is does the change fit the spec and the desired end result of the bigger change. Granted review against bad coding practices is important, but it's not the only thing.
@jordanfox3782
@jordanfox3782 Рік тому
I am pretty sure most of us have experienced both sides. There are planty of things that can go wrong in either side, one is less efficient but has the upside of hiding merge conflicts until the end and gatekeeping the codebase from bad developers.
@johnnyw525
@johnnyw525 3 роки тому
I was about to write a comment on how this was clearly bullshit. I watched the video instead. By the end I got completely what you were saying, and it makes perfect sense. CI isn’t something you can dabble in, and this demonstrates the level of commitment required to do it right. But if the data says it’s the most efficient way of working, then it’s worth seriously considering. Thanks!
@henristahl7203
@henristahl7203 3 роки тому
At what point do you perform code review if you commit to trunk every 15 minutes?
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
All the time, with pair programming is my preference. I talk about that in this video: ukposts.info/have/v-deo/mXmlioCnqYKKzJs.html
@vyli1
@vyli1 2 роки тому
@JulianSildenLanglo
@JulianSildenLanglo 2 роки тому
@@ContinuousDelivery But with pair programming you end up with two authors of the code so now you need a third person to review it.
@ContinuousDelivery
@ContinuousDelivery 2 роки тому
@@JulianSildenLanglo Actually my prefered way of working is pair-programming with daily pair-rotation, so there are more than 2 authors and for big stories nearly everyone on the team will have worked on it. At which point an extra review is redundant. I work a lot in regulated industries, there is no regulatory framework that I know of, anywhere in the world that I have worked, that won't accept pair-programming as a code-review.
@danielevans1680
@danielevans1680 2 роки тому
@@ContinuousDelivery Have you always lucky enough to have an even number of developers in a team, or have you had cases where one dev a day had to do some lone working? (I'm coming from an even worse situation, where I'm in a team as a single software dev - nominally there are two of us, but the other person has an astoundingly large project management workload, and hasn't committed code in months)
@gregzoller9003
@gregzoller9003 Рік тому
Branching is valuable. Many times I use a branch for experimentl changes/refactorings that I’m not yet sure should ever be merged-at least until they prove themselves. If it doesn’t work out, I just delete the branch. Other times I use a branch to make significant refactorings I don’t want to disturb the main code, which is still moving. Its not always possible to think of work as a stream of small incremental changes.
@AlexAegisOfficial
@AlexAegisOfficial 2 роки тому
My preferred way of dealing with staying updated with feature branches is frequent rebasing, this also allows me to have a linear history instead of a git history looking like a weaved basket. Gerrit is a very interesting Git host, it automates a lot of fiddling with branches to the point development can go on for months without even thinking of creating a feature branch. Because in Gerrit you work with patchsets (internally they are just branches where only the head is used, so it acts like a single commit, with all its history still available) and just "replace" commits, and you can do this as long as you like, rebasing it, running CI against it, until you merge it back to the parent branch.
@laughingvampire7555
@laughingvampire7555 10 місяців тому
rebasing is cheating
@BigCarso
@BigCarso 3 роки тому
So if Bob is working on the same file as me, then I'm supposed to pull Bob's changes every hour, understand why he broke my feature then rearrange my feature and break Bob's feature the next hour? Sounds like no fun. Never had a problem with merge conflicts and much prefer to have complete ideas to compare and merge.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Yes, you and Bob should merge your code at least once, but ideally many, times per day to qualify as practicing Continuous Integration. Sure, you may like the way that you work, but the data says that you are more likely to be producing lower-quality software more slowly as a result. That is not me saying that because that is just my guess or preference, that is based on an analysis of 35,000 software projects. My video is an attempt to explain why that fact is the case.
@BigCarso
@BigCarso 3 роки тому
@@ContinuousDelivery Did you provide a link to that data?
@BigCarso
@BigCarso 3 роки тому
The data doesn't say that at all.
@MiningForPies
@MiningForPies 3 роки тому
@@ContinuousDelivery I’m sorry, you have not analysed 35,000 software projects and come to that conclusion - that is utter utter rubbish.
@Luxalpa
@Luxalpa 3 роки тому
@@BigCarso Ridiculous response for someone whose beliefs got challenged. Nobody requires you to adapt your work style to new information. If you like what you were doing or are too ignorant of realizing the problems you have, that's fine, just keep doing it, no reason to change. However, many companies are struggling with their systems, and in particular the problem you mentioned is one of the main causes: If you two break each others feature all the time, then something is already going seriously wrong, and in such a case, a slower merge (like a 300+ conflicts merge) would be a complete disaster both in terms of time investment as well as in terms of keeping the error rate low. It also seems like you haven't watched the video, because it's pretty damn obvious that a change with fewer changes takes less time to merge than one with more changes. Really not that difficult to understand.
@alittlelightcse2762
@alittlelightcse2762 2 роки тому
Best programming content on UKposts, can’t get this level of experience and amount of useful info anywhere else
@Inversions51
@Inversions51 3 роки тому
Thank you for sharing this! When the video started I thought, "this is a terrible idea", but the methods you presented for safely dealing with partial features make a lot of sense. I think branches still seem to make sense for open source projects because of the distributed decision making process in the community. But inside a development team I can definitely see this being a lot smoother.
@mmick66
@mmick66 3 роки тому
I just want to express my gratitude for your content. It’s really professional stuff. As a software developer myself, yours is one of the very few channels I can actually still learn from. Bravo!
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Thanks, I am pleased that you find my stuff interesting.
@ronaldomorillo3789
@ronaldomorillo3789 2 роки тому
If your feature requires changes to shared libraries and database schema, how would you handle potential breaking changes to other areas of the code if you don't isolate them by branching?
@Lascarnn
@Lascarnn 2 роки тому
Very well spoken, constructive and informative. Thank you!
@jefferygriffith
@jefferygriffith 3 роки тому
I feel like this would have been better received if it had been about branch lifespan/scope rather than “don’t branch” since branching is the typical means of code review. It seems to me branch/review/merge often is compatible with the CI definition and provides the same benefits you describe. Thanks for the video!
@objarni
@objarni 7 місяців тому
If you have a team that enjoys reviewing code, that'll probably work! Also, if reviews are done in pairs, even better - then you will get higher bandwidth of communication than the async nature of typical "chat based" reviews.
@objarni
@objarni 7 місяців тому
If however either of those are not true (code reviews take 1-3 days to complete or reviews are done through comments on a pull request), you are missing out on something here
@lvleminckx
@lvleminckx 5 місяців тому
Can you get your devs to do code reviews DAILY though ?
@objarni
@objarni 5 місяців тому
​​@@lvleminckxthat's why pairing or mobbing is my preferred way of working. Code reviews just create lagging or queues at a system level = low flow
@andyd568
@andyd568 3 роки тому
You are the programming mentor i was always looking for but never found. Well now you are here. Thank you for your videos.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Thank you, welcome to the channel.
@precumming
@precumming 3 роки тому
Don’t listen to them, they don’t know what they’re talking about and what he is proposing would just get you laughed at by developers because it’s a stupid approach where he assumes that nobody can communicate. He was late to version control and is confused by it, teams can manage branches and reduce merge conflicts down to 0, especially with microservices (which he is against for stupid reasons)
@Adams456
@Adams456 2 роки тому
@@precumming I fell the same, seems he never worked in a big team, it is so horrible in a real world, he talk about downside of feature branch against continuous delivery but miss to mention the pros
@alexanderoh1847
@alexanderoh1847 3 роки тому
I really enjoy your videos and content. While I don't feel I'm radically enlightened I see these as a great opportunity to share them with less experienced engineers, as the clarity of your arguments is amazing. Thanks
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Thank you!
@nelsonmacy1010
@nelsonmacy1010 2 роки тому
I have your books and all the Devops , Martin Fowler series. You ability to speak clearly and know all the pitfalls is A+. Steve McConnell is also someone I deeply respect. Maybe you can comment on his work in a video or have a joint discussion. Thx for all your hard work.
@egor.okhterov
@egor.okhterov 3 роки тому
Create branches and rebase often. Happy life :)
@AndriiMuliar
@AndriiMuliar 3 роки тому
Fail othen and fast
@c64cosmin
@c64cosmin 2 роки тому
@@kajacx It means you were the only one doing the rebase, if all the team does rebase often you will rarely get in that state, I've been using git rebase for several years and very rarely hit points where it was a hell. It is hell if you are the only one doing a rebase.
@AdarlanTeixeira
@AdarlanTeixeira 3 роки тому
Your videos are great and inspiring! Thank you!
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Thank you
@akemp06
@akemp06 2 роки тому
Thanks David for all your explanations! Very helpful
@KevinBronsdijk
@KevinBronsdijk 3 роки тому
Interesting topic. I believe that this is the way forward; however, one concern I have is related to code reviews. Im not worried about syntax relates issues; this can be automated using static code analysis. I'm mainly concerned about the architecture/implementation of the feature as a whole. When you make all your feature changes within a single branch, you will have a holistic view of that feature's design and implementation (something which can also be used as a reference). This is something which you will lose when committing directly to master. Just wondering how you have solved this problem. Maybe it's as simple as tagging the commits with a feature id, but review tooling just isn't ready for this scenario.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Yes, I think that needs more care. The best way to achieve that design overview is pair-programming linked with regular pair rotation. I describe that, and some of the reasons why I value it so highly, in this video: ukposts.info/have/v-deo/mXmlioCnqYKKzJs.html
@betowarrior_
@betowarrior_ 3 роки тому
I was going to ask that exact same question.
@milavotradovec1746
@milavotradovec1746 3 роки тому
@@ContinuousDelivery Nice video :-) I have to say I usually have different opinions, but I really appreciate your work and ideas. They make me think :-) Pair programming is usually advised as a solution for absenting code review. However, I would be interested in your opinions about pair programming in terms of distributed team - not only geographically, but also across multiple timezones. There might very small overlap suitable for pairing. Thanks again for all your work, I really enjoy thoughts it sparks in my mind.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
@@milavotradovec1746 Thank you. On remote pair programming, I once worked for a financial trading company, based in Chicago, I worked out of the London office, but the team that I worked closest with was based in Chicago, a 6 hour time difference. We paired during the couple of hours of timezone overlap and found it helped strengthen the bonds in the team. It is different to full-time, local, pairing though I think. I think that it helped the team a lot, but there was also a lot of work that was done not-pairing. The way it worked best for us, was I had some stuff that I was working on and the people on the team in Chicago had some stuff that they were working on. I was the more experienced dev, so that it nearly always ended up that I paired on their stuff. I'd give it a go, and experiment a bit with what kind of things you choose to pair on to find out what works best.
@milavotradovec1746
@milavotradovec1746 3 роки тому
@@ContinuousDelivery Thank you for your reply and sharing your experience. One more question - when you worked on your stuff alone, were you still committing directly to the trunk (main, base, whatever :-))? If so, how were your colleagues in Chicago aware about the changes you did? Thank you very much for sharing this, I find it very inspiring.
@retagainez
@retagainez 3 роки тому
One of my favorite channels to watch, I enjoy the style of the videos :)
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Thank you.
@jonnyevason2219
@jonnyevason2219 3 роки тому
Love Dave's channel.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Thanks 😎
@JimmyGee
@JimmyGee 3 роки тому
Wow! I'm happy to have found this channel. Great videos!
@thomasBura
@thomasBura 3 роки тому
The premise is that my small daily commits doesn't break the app even it is not in production, so my colleagues can work on their tasks. But some tasks with a lot of refactorings take days to finish and it could make harder for others to work. Also you would get rid off pull requests that should be reviewed. But don't get me wrong I hate long term branches and dealing with conflicts so we try to minimize size of branch to minimum. Also feature flags are good approach we implement very often. What I prefer is to pull from development branch often so I keep up with current state.
@andrealaforgia
@andrealaforgia 3 роки тому
I would argue that refactorings are the best use case for trunk-based development. If you are refactoring a large part of the code, you’d better ask other people to stop working on that code or you’ll end up with a disastrous merge hell. If you can organise a refactoring as small batches of work to be integrated frequently, definitely do it.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Yes, I agree with that approach. TBD is a MUCH better way to support refactoring.
@carveratutube
@carveratutube 3 роки тому
@@andrealaforgia so you arguing that if you doing a refactoring the 5 other people in your team need to have a pause 🤷🏻‍♀️ Well I agree that while doing some heavy refactoring, generally, nobody else should work on the same code part. But that doesn’t mean you need to do it in the trunk. Refactoring can sometimes not work well and it’s much easier to verify and to revert changes which were done in a separate (feature) branch.
@simonegiuliani4913
@simonegiuliani4913 2 роки тому
I worked with both branches and incremental changes on master. They are both valid. If there are more than 15 devs in you team it will be very difficult not to spawn new branches.
@beepboop533
@beepboop533 3 роки тому
Can't wait for all the supporters in here to get in the field and deal with the struggles this methodology lends itself to. Hopefully they won't become cultists over this and one day will be willing to give branching a chance.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Maybe you should try it? I have tried both and know which I prefer.
@FlaviusAspra
@FlaviusAspra 3 роки тому
@@ContinuousDelivery I highly value your ideas and videos, really. But this no-branch attitude lends itself only to really senior developers. Many other people have mentioned code reviews. The code needs to be reviewed. Why? Because programmers are sometimes too creative with their design, especially the mid-levels who see themselves as seniors. I do agree with a few ideas and it's how I do things: - all branches have to be releasable at any time; developers merge the master branch into their branch every 15 minutes / once a day. This is continuous integration - once the code has been reviewed, it can be merged into master. This can happen once a day, or once every few days - the developer switches back to his branch and continues to work and the cycle restarts This way: - we protect juniors from their own mistakes - we protect the design - we can do pair programming, but doing it all the time is just too much; trust me, I know my juniors - we have design meetings; problem: the junior of the team does not really see the same imaginary code as me when we do the design - and yes, I explain a lot, we do enough pairing, but at the end of the day time efficiency also matters. And releasing often bad design is not time efficient I'm a CTO at a smaller company btw.
@richardcomblen5928
@richardcomblen5928 3 роки тому
Hi. Big fan Continous Delivery (the book) and Accelerate (the other book) here. I've been implementing build processes for more than 10 years for a big variety of projects and I'm a fanatic on software quality. I agree with all the branch by abstraction, feature toggles and dark launch. I have a fundamental disagreement with forcing to work with a single branch. Let me explain my point of view: I want to have the highest software quality. To do so, I automate all the possible quality checks in an automated quality gate, typically: - stupidity checks (duplicate DB migrations, leftover console.log etc ...) - all the necessary linters and static code analysis to spot code smells - unit tests with high code coverage metrics (for code with cyclomatic complexity) - architecture rule enforcement tests (using ArchUnit) - mutation testing - software dependency scanning for vulnerabilities - end-to-end testing for most of the features of the application - UI regression testing with screenshot comparison Well implemented, those checks take 40 minutes wall clock time on a web project after 10 men-years of development (using a standard Spring + Angular stack). I want to deploy to production at least multiple times a day. At any time, tip of the main branch should be production ready. No-one should ever hold his breath before a change getting deployed to production. I've been doing that successfully, with high throughput, over multiple years. How: using short lived branches that have the full quality gate running before being merged. The development cycle is the following: - pick a task to work on - start a branch - as soon as you have some change whose quality is high enough, push, make a self-code review, and get it merged (after pair-review if needed) as soon as the quality checks are ok. - You don't need the task to be complete to merge, you just need the quality to be right, to merge. - You'll typically make quite a few merge requests before completing the task Typical cycle (between branching and merging is less than half a day). If someone wants to keep a branch longer than that, no big deal, he merges the main branch into his development branch as often as necessary (I recommend at least once an hour). He'll have the burden of merging, as he is the one choosing to move away from the "short-lived branch" recommandation. His choice. The higher the threshold of the quality gate, the more frequent the checks are going to be red. If it's red on the main branch, we cannot deploy, so we test before merge. You understand that with such a test battery, considering pipeline 10% of the pushes leading to build failure means the main branch will be red more often than not. This means team blocked hunting for the change failiing the build. Testing on the branches allows as well to: - test the build process update before merging (new compiler chain, different code coverage tool, etc ...) - review app: review UI changes live before they get merged by deploying the branch to a short-lived live environment - code reviews for knowledge sharing (I've read your arguments for pair-programming rather than code review. I'm a big fan of pair-programming, but it's just not always possible, sometimes simply because the work schedule is not uniform among the team members). Conceptually, a developer is always branching. He's working on a local copy that IS kind of a branch. Let's just consider the short-lived branch the equivalent of his local copy. If one is force to push on trunk, he'd better run at least a significant part of the quality checks before pushing. Running well written unit tests for a big project can easily take 5 to 10 minutes (we have many thousand of unit tests). I should run that locally before each push ? Why doing it manually, when tools like Jenkins, Gitlab-CI and many others can do that for you ? Hardware is much cheaper that developers, auto-scalable build farms are just a click away. Short lived branch allow this process to be asynchronous, and let the developer do something more interesting than waiting for the build to be ok on his laptop before pushing. I've now moved on a project that advertise doing trunk-based development (based on your very arguments). Tools have no build-on-branch support (GOCD). Quality gate only contains unit tests and some end-to-end tests. There are just a few deployment to production a month because confidence on the quality is not high enough. There are more days where build gets red at least once than not. I have a strong feeling trunk-based development gets in the way of having a strong quality gate. You can't have both, and without the later, you cannot safely do continuous deployment for mission critical apps. I suggest the following motto: "Long live short-lived branches" (no copyright). I'd be glad to read your feelings about this.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
I think that we are 90+% aligned here. A few thoughts... If your "typical cycle (between branching and merging is less than half a day)" then you are doing CI, so I have no argument with that at all. I think that you are doing more typing than me, I work on master locally and then merge all my local commits immediately that I have made them to origin/master. So I don't have to create any branches or merge to them (less typing for same effect that you describe). To be honest, this doesn't matter at all, if you want to type a bit more it doesn't matter. "The higher the threshold of the quality gate, the more frequent the checks are going to be red" Not so! The slower the feedback loop the more often the checks will be red! Adding branches slows the feedback loop. The problem, as you correctly point out, is the efficiency of the feedback loop. One of the more subtle effects of feature-branching, in my experience, is that it gives teams more room to slip into bad habits. Inefficient tests being one of the most important ones. If everyone is working on Trunk, then slow tests are a pain, so the team keeps them fast. I think that most of the rest of what you are describing is about feedback efficiency. Let's try a thought-experiment... If you could get the answer (is it releasable) in 1 minute, would you bother branching? If not, then what we are talking about then is where is the threshold where the efficiency gains of hiding change (branching) outweigh the efficiency gains of exposing change (CI). I think that CI wins hands-down as long as you can get a definitive answer within a working day. Practically, the shorter the feedback cycle the better, but my experience is that under 1 hour is the sweet-spot. That gives you lots of chances to correct any mistake during the same working day. I built one of the world's highest performance financial exchanges and the Point of Sale System for one of the UK's biggest retailers, and we could evaluate the whole system in under 1 hour. So my preference is to spend time on optimising builds and tests, rather than branching.
@richardcomblen5928
@richardcomblen5928 3 роки тому
@@ContinuousDelivery Thanks for the feedback!
@strangnet
@strangnet 3 роки тому
You can always integrate your work by syncing/merging the trunk with your feature branch. By keeping your work current with what happens in the trunk you ensure that other features that are introduced work with your changes all the way until merged back into trunk.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Yes, but that only solves the problem as far as what has been committed to trunk, if everyone else is Feature Branching too, then you have no sight of what changes they are making until they merge to Trunk. This is certainly better than not merging frequently from Trunk, but it is not the same thing as CI.
@strangnet
@strangnet 3 роки тому
@@ContinuousDelivery that is true, but the only thing I need to consider is what the trunk has, which is "the truth" that is in production. Same for others working in their feature branches. This is however when people work on things without knowing anything what others are doing, which should be rather uncommon unless there is no communication in the team - the occurrences where different team members work on the same bit of code without each other knowing should be rather minimal so "collisions" should not happen unless the code is badly structured as well. By continuously testing my code with the latest changes introduced in trunk I do get CI, I don't see how it isn't. This also helps when my changes are about to be merged into trunk with a pull request, so that other team members get to see if any changes are in fact in line with the current code base and follow the guidelines and principles/best practices the team has decided.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
@@strangnet The problem is that if you have a team of people all working like that then except for the last person to commit, trunk isn't really trunk in the sense of the version of code that will go into production. So everyone is testing against a version of the code that wikll never end up in production. In true CI - the definittion of which includes the statement "merge changes into trunk at least once per day" this is not true, at the point of every merge, trunk is definitive. All this is just our opinions though, the data says that if you have feature branches that last for longer than a day, wether you merge from trunk or not, statistically you produce lower quality.
@DarrellTunnell
@DarrellTunnell 3 роки тому
Some features don't pan out or take longer to complete or require several user stories to be done before the feature could be considered complete. If that code is integrated immediately then should it not pan out you have to "unintegrate" it. Sure you can use feature flags but if you have to pull the feature you have have to remove / undo that code. Forward integrating feature branches on a daily basis is the cleanest solution imho.
@FlaviusAspra
@FlaviusAspra 3 роки тому
@@DarrellTunnell a branch should not live longer than a what a sprint is. It can start in the middle of the sprint, and be finished in the middle of the next sprint.
@Mio2k10
@Mio2k10 3 роки тому
This approach kinda assumes that no one makes mistakes. Imagine someone is committing every 15 minutes. After 2 hours someone realizes that there is a huge issue with the new code which affects everyone's ability to work on their own tasks. Writing tests won't always help. Things can slip through. Also writing tests that early is often times a waste of time because you don't even know what the final version will look like. Thanks for your video tho!
@defeqel6537
@defeqel6537 3 роки тому
Tests should be written on the feature-level, the implementation details don't matter. This is not always possible, but I'd say in 99% of cases it is. Not that I'm convinced that branches should be avoided, but I do think that frequent merging would be useful (again, in 99% of cases), but needs to be done right.
@Mio2k10
@Mio2k10 3 роки тому
@@defeqel6537 Well, there are different kind of tests. Every test kind has its place. I don't see how this is referring to my comment btw. Frequent merging is good, indeed! But you want to merge a fully refined increment not a WIP state to reduce unnecessary friction.
@defeqel6537
@defeqel6537 3 роки тому
@@Mio2k10 I agree, and disagree. Generally, yeah, fully refined increments should be preferred, but as long as it is flagged out, or similar, I'm starting to see a benefit with WIP state changes being merged too. I do think merging WIP requires care though, otherwise may lead to just frustrating your team members. As for testing, my point was that the tests (usually) shouldn't rely on what the code looks like, so they may be written quite early on, after a bit of planning. As for test types, I prefer unit tests, by which I mean code I control the inputs and outputs for. IMO people should avoid micro-testing, where they try to test each function or class separately (unless those are your deliverables, in which case thoroughly test them).
@rogerpetruki4759
@rogerpetruki4759 3 роки тому
Great video, as always Dave. It's good to know that some of the strategies to avoid branching have to do with a great effort I've been putting into releasing a more intelligent and manageable Feature Flag platform. Thanks for sharing your thoughts.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Thanks
@PrinceRambade_Official
@PrinceRambade_Official 2 роки тому
This is much closer to what I was looking for....while youtube is flooded with basic to advanced GIT tutorials but nobody talks about professional implementation and use of CI/CD with lot of confusion on branching.
@Ays536
@Ays536 2 роки тому
Your topics are very informative, these are hot topics and our teams discuss them in the retro. I personally, enjoy reading the different perspectives in the comments.
@zpinacz
@zpinacz 3 роки тому
Nicely explained! Thanks
@FTropper
@FTropper 3 роки тому
How do you implement code reviews if you commit every 15 minutes?!
@cheetah100
@cheetah100 3 роки тому
Compulsory review on commit.
@fauredaniel57
@fauredaniel57 3 роки тому
Espectacular Dave! I loved this
@aaronmacandili7149
@aaronmacandili7149 2 роки тому
Commiting unfinished work to production is kinda scary. I also feel that the “behavior hiding” can introduce unwanted bugs and will need more efforts of removing these hidden behaviors in case the requirement didn’t push through or the requirements have been changed totally in the course of development (dev will have to look for each and every commit just to remove these tiny pieces of hidden behaviors). Also, does this approach considers the need for QA to test the changes? Does this approach requires QA to test the production version whenever there is a new change?
@MuhammadAbusaa
@MuhammadAbusaa 3 роки тому
I think , this is good for small teams that consist of experts and seniors , but when it comes to large projects with many people and the skills vary, then we need a strategy "called PR" to review juniors code as example. Thank for your video . I enjoy it
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Well it scales very well, and I would argue that hiding what people do from one another (branching) may be a defensive strategy for less experienced teams, but is not going to help them improve. My own preference is to combine this with Pair Programming, that way you can mitigate the risk of inexperienced people making a mistake by pairing them with someone more experienced, and they also get the chance to learn more quickly. I describe my thinking on this in this video ukposts.info/have/v-deo/mXmlioCnqYKKzJs.html
@precumming
@precumming 3 роки тому
@@ContinuousDelivery it does not scale well at all, you shouldn’t be teaching something that will lead to more problems. There are no benefits to not branching that can’t be solved with some planning and communication, just because you can’t doesn’t mean that everyone else shouldn’t. People should learn to use branches because that works best, and merge conflicts only mean there was a hole in communication.
@Stylpe
@Stylpe 3 роки тому
@@precumming Are you speaking from experience of having tried proper CI, or are you just pessimistic because you have no confidence or trust in your team or having been disappointed too many times?
@edwardcullen1739
@edwardcullen1739 3 роки тому
@@precumming Notwithstanding that every working copy is a branch, every commit a merge... less experienced developers will more often mess up and take longer to complete complex merges... There are secondary benefits to the frequent integration approach - protection against device failure and interruptions, for example. I think the point here is less in the branching itself and more in totality of the approach; small changes, backed by automated tests... Smaller changes means less to go wrong / less to fix if there's a problem...
@coderlifer4870
@coderlifer4870 Рік тому
Yes, this only works for small teams, small projects, or projects that are not mission critical. People who believe in this will be in for a big surprise when they joined a big company or a big project. Just wait and see.
@GaryvanderMerwe
@GaryvanderMerwe 2 роки тому
I'm a dev with 20 years professional experience. I disagree with this. Code should not land in master if it's not ready. It doesn't have to be perfect and bug free, but it shouldn't be horribly broken. Where do you keep this code while you are getting it ready. But I think there are some important rules for when working in branches: * Merge/rebase master into your branch often. * As soon as you have some parts of your code ready, get those commits merged in to master asap. A git rebase -i is useful to move the commits that are ready to earlier in the commit graph so that these can be merge without bringing in the commits that aren't ready yet. * Do pay attention to what the other devs are doing. If two devs are working on the same bit of code, then they should maybe merging each others branches.
@paul-bouzakis
@paul-bouzakis 2 роки тому
Where did he say it would be horribly broken. This is who’s point. Master is stable, is up to date.
@PhilipJReed-db3zc
@PhilipJReed-db3zc 2 роки тому
He didn't state the assumption here, but I think Dave lives in Blue Sky World where there's good unit test coverage and you can see in 10 seconds or less whether you've broken something in main, so you fix it before pushing back in. Lots of high functioning teams operate that way, but it's not always easy to end up on such a team without orienting your career specifically around that goal. In any event you can introduce change incrementally, and I'd say adequate (and fast!) test coverage is prerequisite to even a hint of "pure" CI as described here.
@VictorMartinez-zf6dt
@VictorMartinez-zf6dt 2 роки тому
Then you’re not doing continuous integration.
@coderlifer4870
@coderlifer4870 Рік тому
@@VictorMartinez-zf6dt , CI is just a means to an end. The objective is to have a quality code in the main branch. You can thoroughly test the main branch, which you should but you also need to do due diligence in making sure you don't continuously pollute it.
@JadeSync
@JadeSync 3 роки тому
Would you suggest something like the "Live Share" extension in VSCode? Where entire team can work on same code and you can see what everyone is doing in real-time.
@IanStevensZA
@IanStevensZA 2 роки тому
or just merge from the main branch into feature branch every day or even after every other person merges into the main branch. It still keeps your code close to the truth and avoids stepping on other people's toes
@75yado
@75yado 2 роки тому
well it's merge up from MAIN and run the tests but the problem is when you merge your work to the MAIN, Others should get the changes and run tests on their work and if they are close to release they could get to the state that their long work is no longer relevant and they would have no more time to fix it so they cannot integrate their work to MAIN and the reason is lack of informations about what do the rest of the team doing
@AloeusCapitalManagem
@AloeusCapitalManagem 2 роки тому
@@75yado uh that shouldn't happen that sounds like dependency hell
@75yado
@75yado 2 роки тому
@@AloeusCapitalManagem no just too many people working on same system. Usual problem was when someone changed something in the geometric kernel or similar module which everyone used
@redhotbits
@redhotbits 2 роки тому
that does not work
@RandyLutcavich
@RandyLutcavich 2 роки тому
That only solves half the problem. You need others to take your changes as well, that only works if you push to Main.
@RowanGontier
@RowanGontier 2 роки тому
I like the principle of continuous visibility of changes. However, regardless of feature branch vs CI, there are few people who will 1) actually look at the commit logs of changes pulled, or 2) see the changes made by others when working on their own ticket. The only thing that wakes people up is merge conflicts. Must say, among the merge conflicts I face using feature branching, very few are due to mismatches based on a fundamental approach; it is minor things like imports/formatting. I like feature branching because a reviewer can see things like architecture of a feature within a PR. I fear that CI will make people approve minor changes with less critical thinking about the big picture.
@mydadletsmeshootatcats6754
@mydadletsmeshootatcats6754 Рік тому
I have the same thoughts about code review on larger features. It seems like it would be impossible to do proper code review. I would love to hear Dave's thoughts on this. The other thing I don't like about committing incomplete features to the master branch is that it makes it difficult to identify zombie code. If you see code that doesn't appear to actually be used, is it zombie code or is it a necessary part of an incomplete feature? You'd have to actually ask the developer who wrote it. What happens to features that were abandoned half-way through? Seems like clean up for that would be a PITA as we can't simply revert the merge commit for a feature branch because the feature was committed via countless tiny commits.
@danepane527
@danepane527 Рік тому
this 100%
@foxy_robin
@foxy_robin 7 місяців тому
@continuousdelivery I would also greatly appreciate your thoughts on the above situation. A FB PR gives a more holistic view on what the problem being solved is and the architecture decisions made to deliver it. The reviewer can more easily see if there is an issue. However a senior reviewer would likely notice an architecturally poor choice very early on, thus saving the junior dev from continuing down the wrong path.
@chronic_adventure
@chronic_adventure 3 роки тому
Do you have any videos that explain where QA processes such as regression and feature testing would fit within CI and CD?
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Not specifically, but I should do something on how roles change for CD. I recommend that you aim eliminate dependence on manual regression testing. That doesn't mean that QA has no place, but the role shifts to exploratory testing of new changes, not going back and checking that old stuff still works. This works most effectively when QA work closely as part of the dev team, evaluating changes while they are bening built, rather than waiting until they are finished. This is easier than it sounds if the team is following the CD principle of "work so that your SW is always releasable". I will think about doing a video that cover some of this in more depth, thanks for the suggestion.
@MiereTeixeira
@MiereTeixeira 2 роки тому
I've worked with a bloke that had the opportunity to work with you back a decade ago. When I'm watching to your videos I can totally imagine he explaining his values, approaches and techniques. Don't mind the people that didn't get what you're trying to explain them. They will, certainly, learn this one way or another. As more videos comes, I'm sure you'll tone down a bit and reach to wider audience. We need this wisdom. Keep pushing mate. Awesome content.
@ContinuousDelivery
@ContinuousDelivery 2 роки тому
Thanks, who are you working with that I know?
@jeangautier1224
@jeangautier1224 2 роки тому
I have a another question, what's youre opinion on using this technique in a mono repo with more than 50 dev working together ?
@patrickroza3073
@patrickroza3073 3 роки тому
I try to minimize branching, especially long lived branches. I also think a good starting point is to have only few branches at any given point in time. To facilitate this; do pair programming or otherwise divide the work, to work in parallel.
@ChrisG-sw5zm
@ChrisG-sw5zm 2 роки тому
Another benefit to CI compared to long-lived feature branches - if there is a merge conflict, it is with the code that the developer wrote *in the last 15 minutes!* This code is fresh in the developer's mind, and they will have an easier time fixing the conflicts rather if the conflicted code was written days or weeks ago.
@StefanKGr
@StefanKGr 2 роки тому
Hey Dave! Love your channel! This is great for on-premise teams. If the teams are distributed all over the world with a single code base, not only that pair programming isn't an option, its that some PRs will have to wait a day to get merged due to time-zone difference. Any advice there?
@andishawjfac
@andishawjfac Рік тому
Why have PR's in a continous intergration workflow? The whole point of CI is to get rid of PR's so you don't have to wait for somebody to approve. Build a good integration testing environment and let everybody commit to that, create a secure and quick feedback loop for devs.
@coder8515
@coder8515 2 роки тому
Yes, this is definitely very interesting. I think that your release/deployment strategies could be integrated also with a more traditional use of VCS. Thank you for sharing.
@so_to
@so_to 3 роки тому
Thanks for this awesome video. I hear what you are saying, my question is how should you handle code reviews in this case? If I understood correctly, the desired process here is to push to master as often as possible instead of hiding the changes in a branch, but it also means the code needs to be reviewd by someone else(teammate) every 10 or 15 minutes which in reality is very disturbing(in terms of context change for the reviewer) and blocking. What's your point of view on that?
@mkschreder
@mkschreder 2 роки тому
I would suggest using upstreaming for this. In such an approach the whole team is committing into a develop branch regularly - this becomes the trunk. Then separate "merge request" branches are created and relevant code is checked out into them using "git checkout develop -- " and then these are reviewed and merged into master. After that master is merged into develop to bring the two branches in sync.
@d1morto
@d1morto 2 роки тому
@@mkschreder Then you're back to multiple branches that aren't always in sync. I would suggest using short-lived branches that are merged within 24 hours. Then, you'd need to make sure your team is reviewing and approving PR's daily.
@mkschreder
@mkschreder 2 роки тому
@@d1morto yeah but that doesn't always work to review daily. The idea here is to commit to develop and then move commits into review branch (or just move changes) I agree that pushing the team to review daily is important but some teams are very slow at this and can take a week to review something that they may not filly understand.
@d1morto
@d1morto 2 роки тому
@@mkschreder The devs would sort through the develop branch looking for their individual commits, and then move just those commits into a review branch? Wouldn't that be tedious?
@OhhCrapGuy
@OhhCrapGuy 2 роки тому
Agreed that they should be very small integrations, integrating at least once a day, but committing and pushing to master allows junior developers to add flaws to master without code review. Merge commits from work branches to main allows associated work (first attempt, write tests, second attempt, add comments) to be grouped as part of a single commit. The commit graph is much more clear about when and why certain changes were made, and a rebase to remove problems can be MUCH simpler.
@ContinuousDelivery
@ContinuousDelivery 2 роки тому
Or do pair programming, even simpler, and the junior devs get to learn faster.
@imanamani3924
@imanamani3924 6 місяців тому
Wow, your video is amazing! I wish there was a way for me to give you a thousand likes for it. Keep up the fantastic work!
@pocoloco453
@pocoloco453 3 роки тому
This was awesome!!
@Gr8thxAlot
@Gr8thxAlot 2 роки тому
This is really great and makes things very understandable, thank you. This seems like an optimal strategy. But, isn't frequent merging to main going to generate a pile of merge/pull requests? Who typically reviews and approves these, and how do they manage this volume?
@vitormanfredini1205
@vitormanfredini1205 Рік тому
From my understanding, you'd commit directly (without making any pull requests). Ideally, the code you're commiting and the existing code base are covered by tests verifying all behaviours, so it gets a lot harder to introduce bugs without tripping the alarms.
@trigun539
@trigun539 3 роки тому
Thanks for the great videos, but there is a basic flaw with your logic here. That is that the feature branches are somehow completely broken apart from the main branch or trunk. There is nothing wrong with having a long lived feature branch as long as you keep merging the trunk back to it. Your graphic is not quite complete, it only shows the merge of a feature to the trunk. But there are many trunk to feature merges along the way while the feature is being built. This can be done fairly easily and this way your feature is always updated with latest code. The feature itself can be tested completely through CI and if tests pass then you are good to merge your feature to trunk. Adding feature flags, dark features, etc involve huge amounts of extra code/tests which are not necessary. Most of the time this will probably add performance issues and extra unneeded code. In some instances this could be impossible if the new feature demands a DB migration or something similar. Having feature branches or even long lived features branches doesn't mean you are not continuously integrating.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Well, syncing with trunk for a long-lived FB is a good idea, but it doesn't solve the problem of what is going on on everyone else's "long-lived FBs". I am not saying that an FB is "completely broken" I am saying that it is not the truth and you can't tell wether it is completely broken or not. You can reduce the chances, but you can't tell until you merge into the version of changes that represents the "truth".
@upgradeplans777
@upgradeplans777 3 роки тому
Edwin, I think you are correct in the observation that dark launches, branch by abstraction, and feature flags sometimes require extra code. But I think the extra code is likely to only lead to a higher quality code base and/or better user experience. With extra code, I mean facilitating code by the way, I think you meant the same? Because there will of course be multiple "feature variants" in the code base, but that is not different with FB, just in branches instead of files. For dark launches, actually no facilitating code is strictly required. For branch by abstraction, the facilitating code (when done right) are mostly interface definitions and IOC mechanisms. Chances are the project will have these anyway, or otherwise are a good addition for other reasons. Lastly, feature flags are a bit more complicated to evaluate. First, they require facilitating code that many projects do not have and would only be a low priority for other reasons. Second, naive implementations impose a configuration burden on the ops team (aka yourself if devops). In my view, feature flags should therefore not be configured, but be exposed as a user preference setting (this can be an internal user of the code, or the end-user). If this is not desired by the user advocate (ux designer, productowner, whoever), then I can probably be convinced to use one of the other strategies entirely. But if the feature flag is desired by the users, then the facilitating code actually improves the user experience, and is not a burden at all. For these reasons I completely agree with Dave that feature flags are more "risky" than the other mentioned strategies. That said, I have in the past dark launched a feature-toggling interface to great effect, and I can't imagine any user advocate not wanting this for themselves (even if they want to keep it hidden from their users indefinitely). When done correctly, the facilitating code should not introduce performance issues, or this indicates other problems. With DB migrations, that should be done by a branch by abstraction on the DB schema itself anyway :-)
@dainiusfigoras
@dainiusfigoras 3 роки тому
pain with long lived branches are not in master, it's in branch. So you can update your branch as many times as you want, but others will not see your changes. And you get merge conflict not because of you pulled changes a week ago, but when you try to merge 2 files that edited same lines. And when you have long lived branch chances that someone else edited that is higher and these people introduced changes in their own branches and then when you want to merge you get a mess, because you have one logic there, another logic here and who is right? If you have highly decoupled work, where you don't work with same code as others, then long lived branches will not create conflicts. But they (long lived branches) will increase business value delivery, regardless.
@mynxeram
@mynxeram 3 роки тому
just merge the current "develop"-branch (source of truth) into your feature-/bug-branch before starting to work on it again, at least every day. It's that simple. Nothing else ever worked with > 10 Devs on one repo. Channels like this show, how far away the theory could be from anything practical :)
@ChristianGroleau
@ChristianGroleau 3 роки тому
Great explanation! Using this CI approach how have you handled code reviews? Synchronous and in-person before pushing to master?
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
My preferred approach to code-review is pair-programming. I talk about that a bit in this video ukposts.info/have/v-deo/mXmlioCnqYKKzJs.html
@josephmbimbi
@josephmbimbi 3 роки тому
@@ContinuousDelivery "My preferred approach to code-review is pair-programming" Amen to that. I wish more of my colleagues were receptive to that idea
@KevinONeillPlus
@KevinONeillPlus 3 роки тому
I see a lot of discussion that feature flags solve the parallel development issue, and I believe they do, to an extent, but they also increase the complexity of the code and make it more difficult to reason about. How does flag x impact flag y? Ahhh I hear you say, well that’s all handled in testing and ci. That’s true of feature branches as well. Branches increase process and development infrastructure complexity. Feature flags increase process and code complexity. Both require coordination and communication between team members. I’ve used feature flag extensively for rolling out experiments in the UI/UX space and they work well. They’re isolated and have a finite lifecycle (the length of the experiment). Cyclomatic complexity has long been shown to a have a major impact on system maintainability. Feature flags by their very nature increase cylomatic complexity. PS: Buying Daves book, reviewing considered opinions are always worth your time.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
I think that you can implement Feature Flags in different ways, particularly if you use them in combination with one of the other strategies. Feature flags don't have to be in the guts of the code if the design is good. But I agree with the point. I am wary of Feature Flags for a related reason the explosion of potential code paths - what do you test?
@haseebs.7286
@haseebs.7286 3 роки тому
9:30 (DevOps Handbook) I am not used to this workflow but I can see it’s merit. In my experience, the biggest bottleneck with feature-branch workflows tends to be code reviews (not branch maintenance or testing feature branches). However, code reviews are also the most important step for ensuring code quality and readability. Google/Facebook do NOT bypass this. I think the benefits the DevOps report outlines might be true with trunk-based: - higher throughput - better stability - higher job satisfaction - lower burnout However I don’t think it’s particularly comforting knowing people can commit anything at anytime without any oversight. I’ve seen codebases use this sort of style with just a linter and the commit history was a really long mess (and the code was a mess too). Really was a nightmare having to work off of that. feature-branch workflow compartmentalizes work much better and has a controlled process for integrating. Trunk-based might get you to the end faster but throughput isn’t everything. For example, a project that’s “released” but is being maintained with occasional bug fixes or other minor changes would not benefit at all from continuous integration. I guess it could work on completely green-field projects but most jobs are working on existing money-making products. Just to re-iterate, even Google/Facebook who supposedly use this trunk-based workflow STILL have code reviews. Ultimately the biggest bottleneck is waiting on others.
@VictorMartinez-zf6dt
@VictorMartinez-zf6dt Рік тому
You can do code reviews without needing to branch and can be done on each commit.
@yenenehmulatu5707
@yenenehmulatu5707 3 роки тому
What would happen after you have merged your small changes to master and part of your code is in product but not yet release. You get told the feature is no longer needed or you need to pause work indefinitely. How do you make sure your partly finished function doesn’t pollute the code base.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Well, I’d question the sanity of the product owner who thought this was the most important thing to do a couple of days ago, and now wants to pull it. Then we could either leave the changes there, if we thought that we’d come back to it, or more likely delete them.
@IslandHermit
@IslandHermit 2 роки тому
@@ContinuousDelivery So it sounds like you're not a fan of rapid prototyping, where you iterate frequently with user input to determine the final shape of the product.
@jasonzuvela
@jasonzuvela 2 роки тому
Maybe they cancelled the contract or the client folded, or funding was lost. Your initial response shows the tunnel vision of a dogmatic approach.
@ContinuousDelivery
@ContinuousDelivery 2 роки тому
@@jasonzuvela I don't think I am dogmatic, I have tried both approaches, so have an opinion on which works better. Sure, rarely, there are changes that completely invalidate the assumptions that your team has been working to. That is always going to be disruptive. If that happens after a CI approach vs after a FB approach I don't see that either approach helps more than the other to untangle the problem. You are, presumably, going to have to extract code that may or may not have been built on top of. This is not as trivial as merely reverting a branch. So I don't think that CI makes this worse.
@coderlifer4870
@coderlifer4870 Рік тому
I've seen developers committing directly to the main branch and never doing a feature or a test branch. The changes are fine and safe. They don't break anything. And then I see the changes reverting what they committed a week ago with a comment saying, "I've made a mistake, this design turned out to be a bad idea or I found a better way to do it." The next thing you know, so much crappy code are already in there that are non-functional. They're harmless but dead code and it just pollutes the code base.
@TheTrek01
@TheTrek01 3 роки тому
One problem that I see with this approach is inability to review / revisit code for any feature much after its iterative release. The feature branch clearly doesn’t have this problem. Any good advice on this ?
@davidbroadhurst4031
@davidbroadhurst4031 2 роки тому
I would be concerned about a project that required merging several times a day because the code I was integrating into was being changed that frequently. I suspect the need to constantly integrate is s symptom of much bigger problems. I've not found a big issue with either approach but I also try to manage change chaos.
@hearnjohn
@hearnjohn 3 роки тому
If you are not using pull requests or mobbing with everyone on the team then what is to stop unreviewed code is getting into the mainline in an uncontrolled way? I know XP is explicit in saying that (at least) pairing is necessary for this to work (partially). What if even pairing is not an option for whatever reason?
@OggerFN
@OggerFN 3 роки тому
Branching shouldn't be responsible for making sure code is reviewed before it's deployed to production. Use jira or whatever to track status of commits and only deploy the application to production when tasks have been code and feature reviewed. CI is supposed to encourage collaboration as everyone is working on the same codebase.
@gpzim981
@gpzim981 3 роки тому
WTF. why this channel doesn't have 1 million subscribers yet?
@j3r3mybr00ks
@j3r3mybr00ks Рік тому
I like the focus on true CI/CD workflow here as the ultimate goal. Personally I do like and currently use feature branches day to day. But we also try to keep our changes small and commits frequent so pull requests are small and they do go into prod on merge to main. Maybe this is a middle ground? If a team could ensure pair or group programming most of the time, then committing frequently to main would work nicely, but in reality that can't be maintained just because even the most committed pair programmer wants their own space sometimes. Anyway, my key takeaway from this is that implementing proper CI/CD is the key and how ever that is achieved then happy days! Nice video Dave I'll be sharing at work 👍
@asartalo
@asartalo 3 роки тому
Hi. Sorry if this is late. How do you deal with projects that need to maintain multiple versions like in libraries that has a version 1 and version 2 but they also need to provide hotfixes and security maintenance to both?
@froobly
@froobly 3 роки тому
In that case, it sounds like you have multiple "productions" in addition to development branches. The idea behind these CI or CI-like workflows is that your current code in development should never get too far from production, and usually that's with the assumption that there's only one "production." In the case you've described, you'd treat each supported version as its own "trunk," and follow the same general principles for each, rather than treating the entire repo as a monolith. Instead of "always be merging to main," it would be "always be merging to v12, v13, and v14"
@georged8644
@georged8644 3 роки тому
This was a very fascinating and informative video! I learned a lot from it but I have a question. How do you handle speculative developments where you are trying out ideas to see how feasible they are and how compatible they are with the rest of the system without committing them to the central trunk? I don't see how to do this without a branch. This is because you don't want your speculative work to interfere in any way with the production system until you are satisfied with it because you may end up discarding it entirely if it proves to be a dead end.
@andrealaforgia
@andrealaforgia 3 роки тому
Using branching for that specific activity is totally fine and probably the only usage that is acceptable. Branching is not necessarily evil per se. It’s a Continuous Integration anti-pattern, though, so to be avoided when you want to integrate often with other developers in order to deliver changes as fast as possible and avoid merge conflicts (typical of long-lived feature branches). However, bear in mind that the longer your speculative branch staying unaligned with master, the more it will diverge with the rest of the development hence the more likely it is that your speculative work becomes less and less relevant.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
For real speculative things, treat them as what they are, experiments, focussed on learning. Aim to always throw away any code you write in these experiments, the value is the learning. This means that you can be more radical in your speculations and aren’t constrained by having to make your experimental code “production quality”. This approach tends to focus you more on what it is you really want to learn too. Try and clearly state what you’d like to find out before you begin.
@georged8644
@georged8644 3 роки тому
@@ContinuousDelivery Thank you both for clarifying things for me! This is kind of what I expected the answer might be but I wasn't sure. I really liked the way the method presented in the video prevents huge divergences in the production code. I've been through a few nightmarish project merges and that was back in the SCCS days. I can see where GIT could lead to even worse ones if you don't impose discipline.
@timseguine2
@timseguine2 3 роки тому
First off I agree with a lot of what you are saying. Certain problems (on an otherwise amenable project) tend to require workshopping before release though, and I feel that in cases like that feature branches and a bit more integration work can be worth the headache in order to get things right. Also, maybe I just don't know how, but I can't figure out a great way to do mandatory code review in a "commit anything that is tested as often as possible" codebase without basically mandating pair programming. That wouldn't necessarily be the worst thing ever. I like pair programming, but I also enjoy programming alone, and I think they are both beneficial. In the projects I have worked on we tended to stay somewhere in the middle and the communication in the daily standups generally kept merge conflicts to a minimum, even when some branches lasted for a week or two.
@paulprescod6150
@paulprescod6150 3 роки тому
Yes, he didn't mention code reviews at all and I infer that they don't have mandatory code reviews.
@mrspecs4430
@mrspecs4430 3 роки тому
Yes, and on GitHub for example code reviews are intended to be done via pull requests
@timseguine2
@timseguine2 3 роки тому
​@@paulprescod6150I am not so quick to jump to that conclusion, but I am sceptical of that aspect nonetheless. The biggest thing is in my experience developers are more willing to make improvements to code that isn't in the mainline branch yet than something they already got merged. Analogous to how most developers won't write tests for code that "already works".
@Tall-Cool-Drink
@Tall-Cool-Drink 2 роки тому
in a perfect world "Continuous Integration" is possible, but our world is anything but perfect. :-)
@ContinuousDelivery
@ContinuousDelivery 2 роки тому
The nice thing about software, is that it is easier to change than the rest of the world, maybe not perfect, but certainly "good enough for CI" 😁
@ylazerson
@ylazerson 7 місяців тому
Very insightful!
@MahmoudAbduljawad
@MahmoudAbduljawad 3 роки тому
So, I still am pro-branching, but I minimise it to a semi-daily merges that guarantees the work is always very close to the truth. Having unfinished work in production doesn't seem to work for me, as it generates bugs more than good results for the devops process.
@redtela
@redtela 3 роки тому
Exactly! I mean, just take the argument that branching is "hiding" implementations and therefore cannot be continuous integration... equally, Dark Launching (or Blue/Green) hides the implementation from being in the Production system. The whole "don't branch" thing (and then going on to say that we should minimise branches) just pushes the problem(s) elsewhere in the development pipeline, just so we can continue to use the term "continuous integration." I'm happy to just have "semi-continuous" integration, I don't see why me or my team should be under any pressure to continually put things into Production.
@ped7g
@ped7g 3 роки тому
@@redtela there's a mild difference that in dark launch the other developers and users don't run your changes in main line, but already may be executing your unit tests along the stuff they work on, so if they modify something your new changes will plan to use, it may break earlier, than brach-way. That said, I quite agree with your sentiment that branching and dark launch are quite similar, probably depends a lot also on the team, their overall habits, and the SW itself, what it does and how and how the work is split between developers. I can easily imagine situations where is no practical difference between the two whatsoever.
@redtela
@redtela 3 роки тому
@@ped7g that "difference" (or lack thereof) simply tells me that the advice of "don't branch" is just a synonym of "make it someone else's problem." At some point, we all must take some form of acceptable risk. We follow gitflow (at my insistence), and so, we use feature branches. We also use unit tests, pull requests, integration tests, regression tests, manual QA and UAT. We use Pair Programming, BDD, TDD, and other methods. We have well over 1000 components in the system, each probably has 17 different "versions of the truth" and a hotfix can leave a developer laptop and arrive in Production within 30mins. Could we do it better? Sure. Are we "statistically producing worse code than if we didn't branch" - I doubt it. Could we release faster by not branching? Possibly, possibly not. Do we "hide" information from other developers? No, because a pushed commit can be pulled into any branch, at any time.
@redhotbits
@redhotbits 2 роки тому
@@redtela you are doing it wrong
@chernojallow6666
@chernojallow6666 3 роки тому
I think u making the assumption that there is one way of implementing CICD and that there is only one place where all feature branches converges which is PROD. I think with a good branching strategy (feature/(123) -> develop -> release/(1234) -> production ) with each branch or branch prefix mapping to a environment, life of that dev team would be much better. This allows for less conflict, two convergence points (merge) for all features (in develop and release) before prod and 3 test env (where 2 env: develop and release have the integrated changes) . Pretty sure there are other ways but a development team of atleast 15 members-without branching it would be a nightmare.
@laughingvampire7555
@laughingvampire7555 10 місяців тому
I've been professionally coding since 2008 and the best way to organize code I have seen was the one I thought was the worst. It was bank using IIS as the web server, and the site of the bank looked like a single site, it wasn't, it was hundreds of tiny little sites, each of them with its own repository, the manager assigning the tasks was the one controlling who was using each of the modules or tiny sites. And we needed to make a change, we had ownership of that module for as long as it took to make the change.
@ggir9979
@ggir9979 3 роки тому
Since we switched to a model.broadly similar to this, we almost never have merge issues any more. We do not merge branches every 15 min, compared to merging once a day I do not see the added value. Developers usually do not work on the same piece of code on a single day, and having to synchronize your repo with the origin every 15 min seems like an overkill. But as said before, with a more manageable timetable, it's indeed a very good practice. But every video I see on the channel I can recognize myself in most if not all the advices given, good to see someone with some real experience take on youbute!
@lucas_badico
@lucas_badico 3 роки тому
I really love this idea. But, we have developed an alternative way. Can I make a response video and than we talk about the trade offs?
@stephanbranczyk8306
@stephanbranczyk8306 3 роки тому
Why ask for permission? Just do it.
@thekodomo
@thekodomo 3 роки тому
I know nothing of programming, but this is just so relaxing to listen to and so interesting :)
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Glad you enjoy it!
@EngineeringVignettes
@EngineeringVignettes 2 роки тому
I am guessing but one of the most challenging aspect of CD may be when APIs have to be changed? So in this case would there have to be a coding rule to allow API changes to happen without breaking everyone else's code? As you stated in another video, at the start of a project it's nearly impossible to have every aspect of the software worked out and so the initial assumption of the starting plan is that it is wrong (I 100% agree with this). So this would also mean that APIs could go into a malleable state during phases of code development leading to many small or one larger commit/push breaking other's code. Does CD talk about strategies for evolving code and hence also evolving APIs? Curious as I would like to kick off my next project using a (correct!) CI / CD plan and I am a bit worried about this bit. Plus I know other people in my team will bring this issue up as well. Thanks for the videos, they are all brilliant and very helpful. I have several books on TDD and other topics (the Martin books for example) and I am planning to pick up yours as well. There are several wrong opinions about CI/CD at work that I need to straighten out :) Cheers,
@droohyen
@droohyen 2 роки тому
What about software which requires high amount of additional documentation (eg proof that code works according to software design, software architecture and software requirements - basically in V-model) What would you recommend? Or even: what about code review? Shall it be executed in trunk after merge, or within this 'small and minimized branches"?
@RolandvanderHeijden
@RolandvanderHeijden 2 роки тому
This may work in a "code-only" feature, but in my world, many features require data changes in persistent storage like databases. I'd rather hold on to a feature branch for an extended period of time and (more than) daily pull in changes from main. This way I'm the one solving my own merge conflicts and push to main would be easy.
@richard_luke
@richard_luke 3 роки тому
This channel deserves more subscriptions and more views in the videos
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Thanks
@geraldoconnor8053
@geraldoconnor8053 3 роки тому
Dave, is there a systemic wave to do code reviews using this approach? Really well explained content thanks.
@geraldoconnor8053
@geraldoconnor8053 3 роки тому
I see it’s answered below 👍
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
My preferred approach is to do code review through Pair Programming. Pair Programming is much more than only code review, but it certainly fulfils that purpose, and is officially recognised as doing so even in the most strict regulatory approaches. I describe pairing in this video: ukposts.info/have/v-deo/mXmlioCnqYKKzJs.html
@Mark73
@Mark73 4 місяці тому
Is this assuming that before the pull request, people don't re-merge any new changes from the main branch into their feature branch?
@pansrn
@pansrn 3 роки тому
Very thought-provoking. Thank you.
@muteza
@muteza 3 роки тому
This is a big problem. Unsafe code ending up in production - waiting to get exploited. I think the demand for instant relief has gone to far.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Nope, this is how some of the biggest, and some of the most reliable, systems have been built.
@Stylpe
@Stylpe 3 роки тому
@muteza You write that as if you think it replaces all other common practices like code review and static analysis and so many more tools
@rhakka
@rhakka 3 роки тому
@@Stylpe Well, it changes code review to pair programming, according to the video and comments. If the best developers/teams merge many times per day, the code reviews have to go away. Even if you have the automated testing to cover your code confidently, you're still then missing out on reviews of a feature as a whole, and instead getting reviews or pairing on small changes without the context of the entire feature. Oddly, even Martin Fowler himself says that for actual features, not just small changes or bug fixes, the best practice is short-lived feature branches.
@Stylpe
@Stylpe 3 роки тому
@@rhakka I'd argue those are issues with better solutions than feature branches, and which this style of CI will force you to learn, for the better. Better separation of concerns, dark/dormant features and feature flags, realising that you don't have to, nay, shouldn't, be producing new code 100% of the time but also review and explore other recent changes both for your own learning and as a kind of code review, having the whole team paying attention during sprint demos, understanding the difference between deploying and shipping.
@tedfitzpatrickyt
@tedfitzpatrickyt 3 роки тому
a fascinating and reasoned argument.
@runonce
@runonce Рік тому
Sounds too ideal to me. Never worked on a team that is even near to have what it takes to do true CI. Thanks for the vid.
@detlevspitzbaard1653
@detlevspitzbaard1653 2 роки тому
Although I'm fairly convinced that the way we develop our application (News Site Backend) is fairly optimal for what we do and how we do it, I watched your video with an open mind and tried to see the benefits of it. However, I couldn't find a way to make this work in our environment and being beneficial to stability, increased efficiency during development and deploying realeases. There was always a tradeoff at some point. So my argument is that concepts which were developed maybe one or two decades ago are still valid concepts but with different constraining parametres. Your argument was that a code should be always in a deployable state - which of course is always given for any branch which is deployed on dev, stage, release or however you may call it. On the other hand it doesn't make sense to commit unfinished code with unfinished unit-tests to a dark release or feature switch - even in the dev-stage - when it is simply not finished because it will inevitably break things. Just for the sake of commiting code every 15mins (you don't open a bridge to the public if its only halfway built). So my argument is, that it is probably a good idea to work in that way but adjust the constraints to the environment they apply to. Maybe commit the code not every 15mins but only every 1-2days when a feature is in a state where it actually could be integrated without breaking things. Another parameter (might) be the actual size of the codebase in relation the changed lines in every commit and the number of devs working on it simultaneously. Either way...good content and nowadays it became equally important to actually know how to organize your code compared to know how to write it.
@esotericbeep5923
@esotericbeep5923 2 роки тому
Ok so I'm 8 minutes in and it seems you're suggesting to minimize the size of the branches, not to be rid of them completely.
@kell7689
@kell7689 Рік тому
I'm just learning about CI/CD now - but is this compatible with projects that are in early development? For instance, I'm often making feature branches that are for large experimental changes/redesigns. If my teammates and I are constantly pushing to master, what happens when I find out later on that my experimentation was the wrong decision and needs to be reverted?
@ContinuousDelivery
@ContinuousDelivery Рік тому
Yes, this is still compatible. Your tests should help you to change your mind, not stop you. Starting out working on branches and then switching later to the more effective, work on trunk, is not the easiest way to do this. Easier to start by working on trunk from the beginning, because your code, and everything else, is the simplest it will ever be at this point.
@dsedchenko
@dsedchenko 3 роки тому
This approach works good with web-based projects, when you support only your environment and have a pretty straight-forward environments (testing->staging->prod). How can I avoid branching in application-based projects, where for example I can have beta and canary builds (like Chrome) for bleeding edge features, and I need for example to create a hotfix for a release version of the app?
@ddtalks2821
@ddtalks2821 3 роки тому
I am curious how this helps/improves/makes worse QA efforts. While I can see it helps reduce the "merge conflict" issuses, are you suggesting that deploying each time a commit to the master branch should be put into QA environment for testing ? (assuming the code commit doesn't "Break" anything) also, assuming testing is being done on the code commit to ensure nothing is broken, how much testing is that ? Unit testing is such a small part of testing (only makes sure the snippet of code doesn't have errors and "passes" whatever tests have been created) Usually there is not integration testing done or more comprehensive testing (regression). So this makes me think that there is still a large effort (once the complete coding is finalized and "ready for Production") that regression/integration and such testing is performed - and if failures found then it is not released into production. Isn't part of CI/CD supposed to be the "code is in a releasable" state? So to me that means a full regression could be run (should be run) every time a commit happens to "ensure" that the code is "releasable". That takes a lot of time to deploy to QA environments and run tests. If you are committing every 15 min, there is NO way a regression testing could be completed in that time.
@test1594
@test1594 3 роки тому
I think he is totally wrong. A branch is only a pointer to a commit, nothing more. Feature branches is a developing method for mainly creating a clean commit history. If you have conflicts in your team because too many developers are on the same code it's better to try to find a different WoW e.g. swarm on that task or don't work on the same code at the same time. So don't stop using feature branches it's the only thing that keeps the commit history clean which is really important thing for finding and understating how bugs were created
@diegosasw
@diegosasw 3 роки тому
Fantastic explanation!
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Thanks 😎
@abhishekramkumar8875
@abhishekramkumar8875 2 роки тому
Thanks for the video , but how do you do code reviews if the code gets pushed to Dev or master branch directly ?
@ContinuousDelivery
@ContinuousDelivery 2 роки тому
My preference is pair programming, I explain that here: ukposts.info/have/v-deo/mXmlioCnqYKKzJs.html
@jack6539
@jack6539 3 роки тому
Having implemented ci and cd last century, I can tell you this is a gross oversimplification. Branches are necessary when the need to isolate changes justifies the overhead for having the branch. There are many reasons to branch ( yes, even by feature) and there are many reasons to not branch. The problem lies with knowing when to apply the method and when not to, and unfortunately many developers have such a low understanding of branchinh that they even conflate directories with branches. The factors involved with these decisions can involve everything from the sw architecture, the competance of tge team, the competance of the vc tools merge capabilities for tye files concerned, and yes, even the release management process. Over the decades I have seen so many people try to oversimplify this and have had to clean up the mess afterwards. At the very least your video should provide caveats like " if the merge tool for the code files is not reliably automatable for >95% of merges ( and yes there are tools that exceed this, and git ootb is not one of them) and your development is project based, not product based with product variants and/or your system is not a safety critical system and/or your dev teams are poorly trained on the effective use of branches etc etc etc. To give a real world example of the impact of branch avoidance, I jave seen an entire product line have to be redeveloped as each product variant was a copy pasted directory of the source code (12 product variants). Despite having the same people maintaining the codebases over a number of years, each copy of the code was so completely dissimilar that a core change across all of them worked out to be cheaper to redevelop the entire product line from scratch ( a $12m decision just taking into account the costs for re accreditation of the variants - let alone the cost of redevelopment and opportunity cost to the business.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Naturally, I don't think that it is a "gross over simplification". It is certainly a simplification, because it is a 15 minute video! The approach that I have described is, and has been used, to build large complex systems all over the world - I have worked on several myself. Occasionally we found the need to branch, and it felt like a failure when we did. I don't think that there is much about software development that is easy, but I also think that, as an industry, we are exceptionally good at over-complicating things. Branches being one of those times where we are prone to mis-using them. Any branch is "running with scissors", it exposes you to risks with BIG consequences if you get it wrong (as you point out). Of course, this doesn't mean that every time you create a branch you will fail. It means that your chances of failure are increased. CI has a different set of compromises and fails more gently IMO. My intent with this video was to point out the costs, and benefits, of both, but naturally my advice to any team is to "prefer CI to branching" and "always branch reluctantly and with care". (I probably should have said that in the video - sic!). I agree with a lot of what you say when you describe naive approaches to branching, cloning different versions of products is a horribly common practice - and terrible solution.
@jack6539
@jack6539 3 роки тому
@@ContinuousDelivery an excellent clarification. It is vitally important that branching strategies are applied by skilled people who know how to balance the various factors within the constraints provided. Unfortunately, there simply aren aren't enough people who do. CI and CD are good methods when applied appropriately, however, I continue to be concerned about how CI and CD are being pushed as being the default or only way. A recent example of the consequences is actually the recent solarwinds hack. It looks like they had a fully automated CD system with a view to releasing quickly, which on the surface seems like a good idea. That is, until hackers put a backdoor in the IAM modules and let tge CD systems punch it out to prod, and then to 16k of the worlds most crucial orgsnisations. Having a fast means of punching through to production is a good thing to have in general, however for some systems, and for some areas of systems, a more rigorous control process is necessary. The approach of fail fast, fail early, fix quickly is simply not viable for some systems where the failures are safety critical. Also, with monstrously large dev endeavours like I have been involved in ( 1600+ developers concurrently, for example), effective and consistent branching strategies become essential for the efffecttive coordination of change implementation. The result of not branching in these situations leads to high numbers of regressions and an explosion of inconsistent environments.
@tube4Thabor
@tube4Thabor 2 роки тому
​@@ContinuousDelivery I can't take seriously someone who considers themselves a failure for using a branch, or compares it to running with scissors. That is the sort of holy war language that doesn't belong in a real discussion. Branches work best when they are used like transactions in a database. They should be small and short lived, but they should also be consistent and complete changes (not complete features).
@RadioWhisperer
@RadioWhisperer 2 роки тому
@@tube4Thabor As an embedded software guy I couldn't agree more. There are so many different kinds of software development, creating one nail to solve this problem turns all projects into hammers. And sometimes forcing the project to be a hammer when it's not is way more expensive than choosing the right process in the first place. It's nice to have this tool be available, it's not a solution for all projects.
@chrisfogelklou7136
@chrisfogelklou7136 2 роки тому
@@tube4Thabor "Holy War" Yes! It's surprising because most of the developers that get religious about any "development philosophy" including functional, OOP, branch strategy, code coverage, TDD, BDD, Scrum vs Kanban, etc, are *junior*. It should be about applying the best practices in the right amount, but not *all or nothing*.
@JoseMaria-of1pj
@JoseMaria-of1pj 3 роки тому
How to combine every 15 min commit with code reviews? Pair programming is not a option.
@ElderHenriqueSouza
@ElderHenriqueSouza 3 роки тому
Yeah, I was thinking the same thing at the end of the video.
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Well, pair-programming is the best answer. I have built code-review into deployment pipelines in the past, in orgs that wouldn’t do pairing, it works better than feature branches, but not as well as pairing.
@javikata81
@javikata81 3 роки тому
If you cannot do pairing you still can do postcommit reviews, doing the code review over commits merged to master. I did it in the past and they are a solution on those cases. TDD in those scenarios is even more important.
@anirangoncalvesbr
@anirangoncalvesbr 3 роки тому
Without a release branch, when do you test the feature? Prior or post merging to master ? What do you do when a whole feature needs to be rolled back in this model ?
@ContinuousDelivery
@ContinuousDelivery 3 роки тому
Run the tests on the code that you are working on locally, on dev machine, all the time during development, then, in CI, the tests are run after commit to origin/master. The local test runs are in the hands of the developer, the CI test runs are a gate, you don't get to release without them being run, and all passing. I have a video on my recommended practices to make CI work here: ukposts.info/have/v-deo/kJxnZp2Ip3edkqs.html
@DavidAtTokyo
@DavidAtTokyo 3 роки тому
Conversely, I'd be curious about when would you test with a release branch? In my (limited) experience with "release" branches, I have found them problematic. In the organization where I experienced them, they had a practice involving "release" branches, but testing was done predominantly on development branches. Changes that "passed testing" were subsequently merged to the "release" branch, and only merged to the main branch after release into production. So the "release" branch was just a branch merging features that individually had been considered to work. But because of the practice of merging such changes into the "release" branch after testing, and prior to release into production, there were instances when changes that had been tested in the development branches were mistakenly missed from being merged into the "release" branch, and of course into production. This led to production issues. Even before that, I was of the view that whatever snapshot of the code is tested, is the same software artifact that should be released into production - there should be no more merging to other branches (e.g. creating new software artifacts) before releasing to production, as it defeats the purpose of testing.
@fabiano-co
@fabiano-co 2 роки тому
Dave, thanks for the video. I'm learning about CI and I'm curious, how to prevent malicious code in a CI project?
@VictorMartinez-zf6dt
@VictorMartinez-zf6dt 2 роки тому
CI
Agile Uncertified | Philosophy Over Rituals
15:56
Continuous Delivery
Переглядів 129 тис.
Top 10 Rules For Continuous Integration
17:47
Continuous Delivery
Переглядів 28 тис.
Eurovision Song Contest 2024: First Semi-Final (Live Stream) | Malmö 2024 🇸🇪
2:23:45
Піхотинці - про потребу у людях
00:57
Суспільне Новини
Переглядів 807 тис.
когда одна дома // EVA mash
00:51
EVA mash
Переглядів 9 млн
Branching Strategies Explained
18:19
DevOps Toolkit
Переглядів 123 тис.
The OTHER Difficult Microservices Problem
15:19
Continuous Delivery
Переглядів 4,6 тис.
Why CI is BETTER Than Feature Branching
16:09
Continuous Delivery
Переглядів 71 тис.
You Must Be CRAZY To Do Pair Programming
24:15
Continuous Delivery
Переглядів 66 тис.
Asking a 1,000 Developers What They HATE About Software
23:48
Continuous Delivery
Переглядів 26 тис.
Why The Hell Do You Still BRANCH?!
8:44
Continuous Delivery
Переглядів 16 тис.
Trunk Based Development
18:49
Split
Переглядів 25 тис.
I wish I knew this When Istarted Programming #school #software  #codingtips
0:34
Claude Ams - Programming Guru 💻
Переглядів 14 млн
🤏 САМЫЙ ТОНКИЙ гаджет #Apple! 🍏
0:29
Яблочный Маньяк
Переглядів 582 тис.
M4 iPad Pro Impressions: Well This is Awkward
12:51
Marques Brownlee
Переглядів 4,3 млн