8

I deployed a very important app (internal business application) last week; over the weekend, I realized that there is a bug in my code but I already deployed the app.

The bug is very trivial and it's completely oversight on my part. The bug is simply missing a null check (don’t laugh at me). I already know how to fix this bug and it would only take me a few minutes to fix it, but there's a whole convoluted process for pushing changes to production at my job. Many people have to sign off on it and the changes need to be re-tested.

Users have not reported the bug. I think I should own up to my mistake and admit that I cause the bug but I'm worried that people will get mad at me. What is the best way to go about this?

  • Does your employer have a system or process for submitting bug reports? – Seth R Feb 17 at 3:40
  • Can you edit your quest to clarify: You say the bug is “trivial” but how trivial? Also, what kind of app is this? An app that end users get to download and install on a device like an iPhone or Android device? Or something like a web-based app that can only be accessed via a web browser. – JakeGould Feb 17 at 3:44
  • 9
    This happens to every programmer, every five minutes - it;'s astonishing it is novel to you, OP ! Obviously you just log it (or whatever) as a bug and start fixing it. – Fattie Feb 17 at 14:11
  • 5
    "but there's a whole convoluted process for pushing changes to production at my job" that's like saying "we have chairs" or "surprisingly, our office contains Air". Heh! – Fattie Feb 17 at 14:11
  • 1
    I remember when the Chrome browser first launched, it got a critical update within hours. Code is never perfect and there's always the odd null pointer that doesn't get checked. Never be afraid to fix these things. – rath Feb 17 at 20:22
27

Report it to your manager. Your manager can decide how to proceed with pushing out the fix. If the bug is somehow more urgent than you realize, your manager will be able to escalate appropriately.

No one (or rather, no reasonable person) is going to get mad at you for making a mistake. Presumably QA and the code reviewers did not catch this bug either, so the blame doesn't lie entirely on you anyway. They will of course be more upset to find that you discovered the bug and didn't tell anyone

  • 8
    "No one is going to get mad at you for making a mistake", that's a bit presumptuous. Don't you think what you mean is: "No one is going to get mad at you, but if they do they don't deserve you in the first place"? ;) – Sander Verhagen Feb 17 at 3:39
  • If there's a chance that someone will get mad at OP for self-reporting a bug, then they'll certainly be much more mad if OP waits for it to have actual customer impact before it gets reported. – Sam Hanley Feb 18 at 15:32
2

It feels like your company's processes are part of the problem. Ideally, if the bug is not causing any actual consequences for your end-users, you should be able to get a fix into the master branch, along with an automated test to verify the fix, and leave it for your managers to decide if it needs an immediate deployment or can be saved for a future release (the latter being more likely if it isn't actually manifesting, or the consequences are no more than an irritation).

However, reading between the lines it sounds like there's a lot of manual testing and no policy of master always being releasable. Would you be in a position to push for practices to change?

1

I would see if I could trigger the bug in the deploted code. Then try to write a reproducible instruction for doing so.

Once I quickly (less than an hour idealy) did that I would, regardless of success in reproducing, report it either in a bugtracker or to your manager.

1

Any non-trivial bit of software will have bugs in it. Spotting the bug just after issuing a release is unfortunate, but that's just the way it is.

If your organization has a bug-tracking system, then log it. If it's not affecting users, then it's a low priority bug. It may just sit in the bug-tracker until it gets fixed in the next release.

Don't cover it up, but at the same time, there's no need to make a big song-and-dance about it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.