First Responder Kit Re-Release: The Hubris Of Titles

The Gods of the Copy Book Headings Frowned Upon Me

So yesterday, I pushed out a new FRK.

You could say I FRKed up, and you’d be right.

Not so much

See, before I push stuff to master, I do a round of testing in our AWS lab to find version-specific bugs and make sure everything is at least compiling.

If the round of testing passes, I bump version numbers and merge the changes into the master branch.

Yesterday, I found a bug in sp_BlitzCache after bucketing some checks into version-specific sections. I did this to avoid unnecessary XML processing.

For example, versions of SQL Server prior to 2012 don’t have a NonParallelPlanReason in there, so I figured I’d save some CPU cycles by not looking for it. Trace Flags are also only in newer versions, so I added a version check for them too.

The error was that later on in sp_BlitzCache, we look at the #trace_flags table to provide information about which trace flags are enabled, and that select needed a version check, too. So I added that, bumped version numbers, and then…

Well, that didn’t make it to the master branch.

Until this morning.

After causing some grief for a user.

Sorry, friend. Have an upvote for your trouble.

Eggy

The issue has been fixed, and everything has been updated and refreshed on our end. If you use older versions of SQL Server, and sp_BlitzCache, you’ll definitely want to download the update.

I’m looking at better ways to do the last round of testing and make sure this doesn’t happen again. If anyone out there has any Hot Git Tricks (aside from “pay attention, dummy”), leave a comment.

My Walk Of Shame continues.

Previous Post
First Responder Kit Release: Ça plane pour moi
Next Post
The 2017 Adaptive Join Optimization Eats Bad TSQL For Breakfast

4 Comments. Leave new

  • Kelly Currie
    May 2, 2017 12:58 pm

    I applaud you! Not for that fantastic code, but for admitting and owning the mistake. This is an admirable trait that everyone needs to learn to do as we are not perfect. (I’ve seen folks sneak fixes in to correct the problem but never own up to it which causes problems when the user sees a mistake that magically gets fixed by downloading or trying again.)

    Reply
    • Erik Darling
      May 2, 2017 1:31 pm

      I appreciate it. Still stings to mess up, but I’m still learning GitHub (which is slow, since I don’t use it a ton).

      Reply
  • Joseph Gooch
    May 2, 2017 3:31 pm

    How do you do your AWS testing? Are you using Travis with Github? You should be able to automate your testing process and do unit tests every time a new commit is entered, and it’ll give you the green light on it’s own.

    From that point forward, every time you find something that breaks a user, you just write a new unit test to make sure it doesn’t happen again.

    See travis-ci.org

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.