dbachecks icon indicating copy to clipboard operation
dbachecks copied to clipboard

Issue 320 fix?

Open reitse opened this issue 6 years ago • 5 comments

A New PR

THANK YOU - We love to get PR's and really appreciate your time and help to improve this module

Accepting a PR

Before we accept the PR - please confirm that you have run the tests locally to avoid our automated build and release process failing. You can see how to do that in our wiki

https://github.com/sqlcollaborative/dbachecks/wiki

Please confirm you have 0 failing Pester Tests

[x] There are 0 failing Pester tests (there were 0 Pester tests so that was easy ;))

Changes this PR brings

Please add below the changes that this PR covers. It doesnt need an essay just the bullet points :-) This function checks the available disk space and compares it with expected file growth. If the growth is larger than the available space, time to act!

reitse avatar Jun 07 '19 21:06 reitse

Goodmorning @SQLDBAWithABeard and @shaneis,

I'm blocking time this week to get this baby cleaned and babypowdered ;). Last time we met at DataGrillen there were two things i had to work on. Because my lately memory is best described as 'mildly incontinent', all i could remember was that i had to make sure it could work with the assertion module. I tried to read that module and understand what's happening there. To my untrained eye it looks like the custom object that i've added to the code is picked up, asserted and the result is returned. Would you mind giving me a pointer as to where the code should be heading? I've browsed through the tests as well, should i add to, e.g. Database.Tests.ps1?

reitse avatar Aug 05 '19 05:08 reitse

Reitse! Have you checked dbachecks/internal/assertions/ for examples?

shaneis avatar Aug 07 '19 14:08 shaneis

Hi Shane,

I did :). And that's one part of the question. Is my little check database, instance or server related? I'd say server but the big beardy boss has the final say :).

If the server assertion is the way to go, i'd have to add an assertion in the Get-AllServerInfo function and pass the result (if needed) to the new function Assert-DiskGrowth or whatever the name might be.

Am i thinking in the right direction?

On Wed, 7 Aug 2019 at 16:10, shaneis [email protected] wrote:

Reitse! Have you checked dbachecks/internal/assertions/ for examples?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sqlcollaborative/dbachecks/pull/623?email_source=notifications&email_token=AIAYUDN5R3EAVCDYH7OBLZTQDLJW7A5CNFSM4HV3RKCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3YRA5Y#issuecomment-519114871, or mute the thread https://github.com/notifications/unsubscribe-auth/AIAYUDJ6DGKDYE2AMHAPX33QDLJW7ANCNFSM4HV3RKCA .

reitse avatar Aug 07 '19 14:08 reitse

You are absolutely correct with your logic for the processing of the check @reitse :-)

Now, where should the check life?

That is indeed a fantastic question and one which I can logicallly answer with Server or Instance or Database!!

I am going to say Instance and have it fail at an instance level as possibly if there is not enough space for one database to grow then you dont want 100 errors for the next databases

SQLDBAWithABeard avatar Aug 08 '19 07:08 SQLDBAWithABeard

I've added the assertion and hope It's somewhere along the line of where it should be.

Eagerly awaiting your constructive comments! :)

reitse avatar Aug 18 '19 12:08 reitse