Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test-DbaBuild Doesn't Return SQL 2019 CU30 as the Latest Version #9564

Closed
bwiggins10 opened this issue Dec 15, 2024 · 7 comments
Closed

Test-DbaBuild Doesn't Return SQL 2019 CU30 as the Latest Version #9564

bwiggins10 opened this issue Dec 15, 2024 · 7 comments
Labels
bugs life triage required New issue that has not been reviewed by maintainers

Comments

@bwiggins10
Copy link

Verified issue does not already exist?

I have searched and found no existing issue

What error did you receive?

No error, just returns that CU29 is the latest version and won't allow patching to CU30 via Update-DbaInstance

Steps to Reproduce

# provide your command(s) executed pertaining to dbatools
# please include variable values (redacted or fake if needed) for reference
Test-DbaBuild -SqlInstance SQLServer -Latest

Please confirm that you are running the most recent version of dbatools

2.1.28

Other details or mentions

Trying to patch to 15.0.4415.2 - I can see that version is present in dbatools-buildref-index.json

What PowerShell host was used when producing this error

PowerShell Core (pwsh.exe), Windows PowerShell (powershell.exe), Windows PowerShell ISE (powershell_ise.exe)

PowerShell Host Version

5.1.17763.6530

7.4.6

SQL Server Edition and Build number

SQL 2019 - 15.0.4355.3

.NET Framework Version

.NET Framework 4.8.4770.0

@bwiggins10 bwiggins10 added bugs life triage required New issue that has not been reviewed by maintainers labels Dec 15, 2024
@niphlod
Copy link
Contributor

niphlod commented Dec 16, 2024

something is wrong with your dbatools, either you don't have an updated build reference or ... I don't know.

Running this command (asking for 15.0.4355 build, and the latest CU available) results in CU30 being the identified target

Test-DbaBuild -Build 15.0.4355 -MaxBehind '0CU'

Build          : 15.0.4355
BuildLevel     : 15.0.4355
BuildTarget    : 15.0.4415
Compliant      : False
CULevel        : CU25
CUTarget       : CU30
KBLevel        : 5033688
MatchType      : Exact
MaxBehind      : 0CU
NameLevel      : 2019
SPLevel        : RTM
SPTarget       : RTM
SupportedUntil : 2030-01-08 00:00:00
Warning        :

@Andy-VG
Copy link

Andy-VG commented Dec 16, 2024

I don't see 15.0.4415.2 in dbatools-buildref-index.json using dbatools 2.1.28.

But isn't this to be expected? dbatools 2.1.28 came out in Nov, and CU30 came out a few days ago - so I would not expect CU30 to be available in 2.1.28.

@niphlod
Copy link
Contributor

niphlod commented Dec 16, 2024

what you see in https://dataplat.github.io/builds you can see in dbatools, too, provided that you keep regularly updated the build reference.
This can be done via

  • Get-DbaBuild ..... -Update
  • Test-DbaBuild ..... -Update
  • Update-DbaBuildReference

@bwiggins10
Copy link
Author

@niphlod - Did a fresh uninstall / reinstall of DBATools today, when running Test-DBABuild 15.0.4415 -MaxBehind '0CU'
I get:
image

So then when I go to run Update-DbaInstance -ComputerName $_ -Path "PathToSQL2019CU30" -Restart -Confirm:$false -KB 5049235 -Verbose
I end up with:
[Resolve-DbaBuild] no info in store for this release

When running Get-DbaBuild against a server that's already on SQL 2019 CU 30 I get this:
image

@bwiggins10
Copy link
Author

bwiggins10 commented Jan 12, 2025

What I did find is that in the local copy of dbatools-buildref-index.json right after a fresh install (And after trying to run update-dbabuildreference several times) - It didn't contain a reference to SQL 2019 CU30. When I ended up manually adding it:
image

This resolved my issue and I was able to receive the expected results back.

@niphlod
Copy link
Contributor

niphlod commented Jan 12, 2025

2019 CU30 is in since #9560, the latest release of the module is from november, so you need an -Update that pulls the new buildref from internet, without the need to update manually the module.
Going to close this as the discussion is reversing around being able to pull the latest update, which I just confirmed is working fine.

image

@niphlod niphlod closed this as completed Jan 12, 2025
@bwiggins10
Copy link
Author

bwiggins10 commented Jan 12, 2025

Thank you for the confirmation that makes sense. After running that same code you have there, I get a matching output.

What's weird is that when I ran update-dbabuildreference or get-dbabuild with -update - Neither returned the right results for me, but doing the test-dbabuild with -update worked.

These were all from the same powershell session:
image
image
image

(I'm good with the issue being closed, just wanted to include the above as the remaining info from my end)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs life triage required New issue that has not been reviewed by maintainers
Projects
None yet
Development

No branches or pull requests

3 participants