S.O.S Refactors and lack of communication between different teams (that break each other's features)

Hi there! Iā€™m not very active here but right now I feel like the community can help me come up with ideas because I very much need them blush.

Our product is a C2C and B2C solution (kinda like Vinted ) and weā€™re organized by tribes split by user experience, i.e. Seller, Buyer, Marketplace, etc. I was recently moved to a different tribe in the company and one particular team is eager for me to help them avoid lots of bugs (itā€™s happened) whenever thereā€™s a refactor. Iā€™m lost and I feel like a complete impostor. I am a user of the app but I donā€™t know ā€œeverythingā€ (can anyone even?) and Iā€™m struggling to help them find solutions to plan things better and avoid breaking a lot of things from other teams whenever they refactor something.

Iā€™m currently working on a doc I call ā€œTrigger questionsā€ in which I speak with different people and come up with a list of things we should take into account (and encourage communication with the other teams!) when we plan a refactor. Iā€™ve also suggested modeling before refactoring (like a mindmap) so we can have an idea of different areas that could be affected by our changes. Weā€™ll try these things and see how they work.

My question is, have you been in a similar situation? If yes, what helped you help the team?

PS: I tried to provide enough context, I hope it is :slight_smile:

Thank you so much for reading!

6 Likes

Hi,

The first thing that comes to mind when I see 'to help them avoid lots of bugs ā€™ is to find out what your role is and their concrete expectations:

  • Product manager - help them define better specifications and offer technical support if possible;
  • Development lead - define, design and lead development practices;
  • Quality Assurance Engineer - analyze development issues, fix them, review code, fix bugs, improve the code, write low-level checks, build scripts/tools to help developers test(Google was using QAE with tasks like these)
  • Software Tester - identify quickly the problems or potential issues impacting the quality of the product and inform the relevant people that matter;
  • Release manager - lead the process of release and not go through if there are pending bugs that would require fixing.
  • Other?! maybe an Automation engineer - which codes hundreds of checks in the logic/flows of the application as a net for the obvious issues.
2 Likes

Keeping backward compatibility is key - by doing integration regression testing, youā€™re making sure everything works as it did before. You donā€™t need to test anything new, just that the integration still works after refactoring. Refactoring is tricky - thereā€™s no magic solution to avoid breaking stuff and having bugs :slight_smile: Devs from different teams gotta talk and figure out how to handle everything - integrations, APIs, schemas, etc - without breaking the whole system. In some situations, you might run almost 2 systems/interfaces for a bit to switch from the old to the new code.

Planning is important - break down the refactor into smaller iterations you can do it step by step. Itā€™s gonna take more time and resources, but itā€™s way easier to manage and less likely to cause critical issues. Make sure thereā€™s a code review process across all teams, so everyone understands and accepts the changes, and plans any extra refactoring that needs to be done on their sides.

The real issue probably is in having a solid dev process that all affected teams get and strong engineering management to maintain. needed formalities in processes. As QA, finding every bug or cutting down on them significantly might not be possible :slight_smile: but keeping them manageable is possible. Refactoring is basically a feature :slight_smile: If youā€™re implementing a big feature or several across different services, youā€™re in the same situation.

Try to use automation - think e2e API tests, unit testing, contract testing, etc. Use feature flags to ship refactoring so you can switch between old and new code as and when and if needed. Keep tech docs and diagrams up to date, have cross-team meetings, and make sure everyone who needs to know, does.

1 Like

I was motivated to write a more structured but also simplified post about this topic on LI :smiling_face: :sweat_smile: so maybe itā€™ll be a bit easier to understand some of my points Konstantin Sakhchinskiy on LinkedIn: #qa #qualityassurance #softwaretesting #softwaredevelopment #refactoringā€¦

1 Like

This might be useful.

In the past I worked for a company with two products sharing some code and dealing with different users. The devops engineers had the following things implemented:
= for each feature or change, a developer had to make automated tests to assure that the code worked as required. The bulk of the tests were unit tests, which could be executed within seconds. Test Driven Development was their way to develop the code.

  • In order to manage the code, they used git, a version control system. There was only one single branch. If the code would break, then it would become obvious within minutes.
  • A developer could only integrate code in this single branch after passing the auotmated tests of all parts of the system.

There were other house rules for development, but the described ones had a major impact on the quality of the products.

1 Like

Welcome back @antonella . Yeah, Iā€™m curious as to why the company keeps on refactoring, I mean thatā€™s not actually a customer value piece of work, but maintenance work for engineering sake. Which is a velocity enabler or a velocity killer.

I am not so sure you are so much preventing ā€œbugsā€ as preventing ā€œregressionsā€, and as such I find the friction that having a very strong full automated regression testing suite imposes, means that every refactor has to work the same as the one before. And in reality, thatā€™s not true all of the time. During a refactoring, you may find many reasons to update or to fix the UI (or for that matter to fix any api interfaces and integrations. And I think it has been unhelpful to create the myth that regression tests must always pass, so I think for me, that would be my first ā€œtriggerā€ or myth to bust in any conversations. Refactoring is a chance to make security as well as UI and workflow changes.

As for ways you might actively help, it might be in championing the socialising of internal test environments where the teams integrate all their components into a environment usefull for not just automated-testing, but also for those B2C demos as a way of turning the integration testing you already do into something far more ā€œsocialā€ as well as better understood by all teams. Things become less ā€˜chuck it over the fenceā€™ when there is a test sandbox that is always live and up to date. Hope thatā€™s an idea that is highly technical but only requires communications and people-networking effort to do.

Having a place where everyone can see their refactoring and show it off being that step towards the 3 teams/divisions in the company being able to share by seeing new features early, and being allowed to play because nothing can really break is powerfull.

3 Likes

hello @antonella :wave:

Thanks for reaching out an sharing your thoughts.
It sounds like youā€™re navigating some new territory within your company, but youā€™re not alone in feeling that way.
Remember you were chosen to be part of this team for a reason!

Your approach creating a Trigger questions doc & suggesting modelling before refactoring shows great initiative and problem-solving skills, itā€™s all about fostering open communication & collaboration b/w teams which is a key to successful refactoring.

In similar situations, Iā€™ve found that transparency and teamwork are crucial. Building relationships with others and fostering a culture of knowledge sharing can help immensely. Donā€™t be afraid to lean on your colleagues for support and bounce ideas off each other.

Keep up the great work, youā€™ve got this!!!
NO MATTER HOW SMALL, EVERY STEP FORWARD IS PROGRESS.

3 Likes

Thats a rough road.

I think I have an understanding that:
You dont have the Subject Matter Expertise that longer term folks have
Your application is subject to changes that teams external to yours are making, causing regressions that your team didnt create.

First, find the SMEs that do exist. Often they are in Product Support (they know all the ugly warts in the system) Product Management (they know all the business rules) and engineering management (they know how often their teams have to fix the same things) Learn from them. Always create test documentation. Even if its brief. Either a planned set of tests OR a record of tests that have been done. This is so that all of those mentioned disciplines have something to go over and examine for gaps in testing. I find it also helps me articulate my understanding of the feature or the change being made

If there are tools in the build process that articulate upstream changes, get to know them. If there arent, encourage the implementation of them. Work with engineering leadership about how you all can be aware of dependencies changing in the codebase. Dont just accept a build. Look at the pull requests involved. Over time you will learn to recognize areas of risk. Or at least ask. In my last role this would happen often. It had taken a long time but I knew which changes were risky. An external developer (single) had created a particular email service. He like to just push changes. Now We couldnt detect those changes (and he was a jerk about bothering to announce them) But when we had a feature change that would touch any aspect of email, I would alert on that and loudly communicate that the development and testing needs to be broad and deep around any email dependency

And do continue to create a culture of that communication. We continually struggled with it. Our Product managers and engineering leads were instrumental in those comms. Where a PM would call out that this feature chage or business rule change they were making would impact other team features. Engineering leads would call out when a PR they were reviewing was depended on by other teams.

It will never be perfect and it takes relentless leaning on others to get that culture to shift slowly. Keep at it!

2 Likes

If this problem is an ā€œissueā€ for you, you may try to dig into finding the cause first before trying to plan on ā€œhow to avoidā€.

The first thing I would do is understand the dev team ability. e.g.

  • Will the team combination be having too many junior dev?
  • Does this problem only happen in this team/ specific personā€™s work?
  • Is the team scale too large to manage?
  • Will the pull requests be stacking for a long time before review and merge?

This is not to blame anyone, but to check if we need to talk to managers on people arrangement.

Another check point is on the timeline, are the dev finishing the refractor in a rush for a deadline? Mistakes may occur easier if they donā€™t have enough time to review and check their work.

You could also suggest a retrospective with the team to know more about the reason behind. Communication is important to solve problems.

Of course also check the testing process, but this is mostly to avoid the situation going worse, but not tackling the root cause.

  • How early/ frequently are the tests run? As in projects with many bugs, it may require early testing to shorten the feedback loop with developers.
  • Is the defect list well managed? As if bugs keep growing it will be hard to see the priority of issues.
  • Are the high-value issues being prioritised to report and arrange for fix? If impossible to have nice builds, at least we ensure the main features are not breaking.
1 Like

Hi @ipstefan! Iā€™m sorry I forgot to mention my rol, itā€™s called ā€œQA Engineerā€ but what itā€™s expected from us it to coach the teams when needed so they can come up with solutions that work for them. Also, we arenā€™t embedded on a team, we split our time working with multiple teams.

Hi @shad0wpuppet Iā€™m super happy it inspired you to write a post!
Iā€™m happy to say that the list of potential things to take into account that weā€™ve been working on has all the things you mentioned, so it seems like weā€™re on the right path and I find that a relief, to be honest.
Thank you so much for taking the time to answer my question so thoroughly!

1 Like

Hello @han_toan_lim thank you for your reply. I believe our devs are already doing this with every piece of code they merge, but Iā€™ll ask to learn if theyā€™re doing it with new features mostly or also with refactors.
Thank you so much!

Hi @conrad.braam , thank you for taking the time to answer to my question!

Currently, the problem these refactors cause isnā€™t really affecting the regression or the automated tests we have (or not in a big way, because no one has complained about it yet haha).

We do have a beta environment and weā€™ve been suggesting for years that perhaps we should have one more environment, since beta is ā€œeveryoneā€™s sandboxā€ and sometimes things that should work donā€™t because someoneā€™s deployed something thereā€¦but it hasnā€™t been a problem for at least the past two years, since I think communication improved and weā€™re alerted when someoneā€™s going to merge something and cause some temporary disruptions.

I think theyā€™re refactoring this important parts because theyā€™re legacy, and they have two goals: 1) implement the latest design system and, 2) update the code so that they can carry out their next ideas on the roadmapā€¦however, reading this question of yours made me thinkā€¦so Iā€™ll be surely asking the team WHY weā€™re doing it because I sense there might be more than I think.

Once again, thank you for your reply! Reading all the different replies is making me think that perhaps the issue here (Iā€™m new in this tribe, so I donā€™t have the full context) might be linked to speed and pressure to deliverā€¦so I think Iā€™ll push some buttons there to see what answers I get :smiling_imp:

1 Like

Hi @ansha_batra thank you thank you thank you for this. Perhaps thatā€™s the solution I was really looking for, someone to remind me that Iā€™m already trying and that Iā€™m trying to find a collaborative solution because, truth is, I think thatā€™s the key to solve this problem: collaborate more, often and better.

Thank you! <3 I hope you have a brilliant day!

2 Likes

Hi @msh , thank you for taking the time to answer to my question.

I think weā€™re already doing many of the things you mentioned BUT youā€™re telling me something Iā€™ve been feeling for the little while Iā€™ve been working with this team (3 weeks-ish) which is ā€œif we donā€™t know many things about the area of the product weā€™re refactoring, then letā€™s find someone who does!ā€. Iā€™ll follow that path to see what I find out! Thank you!!!

2 Likes

Hi @joyz thank you for taking the time to answer my question.

Your initial questions are super interesting and combined with some suggestions given by other people here, I think theyā€™ll allow me to get a better picture of what could be the actual problem here, so I marked it as a solution.

Fortunately, weā€™re monitoring bugs and defects pretty well and also prioritizing them well enough, so I think that the actual team + speed they commit themselves to + lack of breaking refactors into smaller deliverable chunks might be causing some pain hereā€¦Iā€™ll keep investigating and asking questions to make people reflect.

Thank you so much! Have a lovely day <3

1 Like