There is a probability of bug detection if anything in software doesn’t perform as expected. Testers use a bug tracking tool to resolve such issues. A bug fix is primarily a patch to the present code base that can resolve the problems and guarantee that “something” functions as per the expectations. These sorts of patches fix a thing and break many others. Experts advise that sometimes it is significant to reject a bug fix and ask its author to re-make the patch just to safeguard it from the bigger problems.
Keeping this scenario in mind, we are presenting you some valid reasons to reject a bug fix.
1. It Doesn’t Reproduce the Issue
From time to time the whole system is perhaps down due to a small typo in one line of code. An apparent bug fix is to eliminate the typo, but that’s not what a good project expects from us if we take quality into consideration. The issue is not the typo but instead the nonappearance of unit tests that would detect the typo during the deployment phase.
The original issue is the lack of test code coverage in this specific section of the code. By eliminating the typo, you are not improving the project. Additionally, you are doing it damage — by concealing the original problem.
Hence, no matter how cosmetic or tiny the problem is, its bug fix should entail an additional test that first repeats the bug. In absence of such test cases, a bug fix is a waste of the project’s money.
Additionally, in an absence of a unit test reproducing the issue, there is no guarantee that our bug fix doesn’t produce additional bugs.
2. It Damages Code Coverage
After the alterations are made in one place, unit tests fail to deliver the desired results in some other places. The bug is fixed, however, a few probably unrelated unit tests begin to report the failure. Testers don’t fix them because they are lazy. So, they remove tests and mark them as “skipped”.
The unit tests are there just to stop testers from damaging the product when they are under pressure.
Apparently, there are circumstances when the unit tests are erroneous and tester have to delete them. In those situations, it is important to create a new one.
There are also circumstances when the bug must be fixed in some time to put the system back online and setting all unit tests will take one hour. This type of a situation is a solid indicator that testers will face a dreadful underlying situation with test coverage in the product. They have to make a fix and ask the tests to stop for some time. But in this scenario, make sure the coming task your team is working on after the bug fix is released is adjusting those disabled unit tests.
3. It Fixes More Than One Issue
If a bug fix patch has code modifications that fix various issues, it is ambiguous to understand:
- Which issue is tested
- Which one has been reproduced
- How they can relate to each other
Uniting numerous bug fixes into one pull request is not considered a good practice.
It doesn’t matter how easy the fix is, you are advised to keep it separate from others. In fact, review, test, and merge it separately. This will lead to an increase in the traceability of changes. This makes it easy to understand the code review, and the time it was deployed.
4. It Is Very Big and Difficult to Understand
Bug fixes cannot be called features, they must be focused and small. Programmers usually get carried away while resolving a bug and introduce some refactoring together with a fix. As a consequence, the patch gets very difficult and big to understand. Refactoring is a very important and a positive thing for a project. However, you are advised to do it separately after fixing and merging the bugs.
It is suggested to create a new unit test, reproduce the bug, commit it. Fix the bug in the present code no matter how difficult it is. You must create new bugs, and ask the team to improve the situation that has difficult code base. Assign those bugs to yourself, if you are interested.
Ray Parker is an entrepreneur and internet marketer with over 9 years of experience in Search Engine Optimization, Creative Writer and Digital Marketing Consultant.