tediousjs / tedious

Node TDS module for connecting to SQL Server databases.
http://tediousjs.github.io/tedious/
MIT License
1.57k stars 436 forks source link

CI fails when SQL Server 2022 CUs can't be dowloaded #1666

Open arthurschreiber opened 3 weeks ago

arthurschreiber commented 3 weeks ago

@dhensby Every now and then I see the warning Warning: Unable to download cumulative updates from tediousjs/setup-sqlserver@v2, and if that happens, builds on SQL Server 2022 fail because the TDS 8 feature is broken on an unpatched 2022 version.

Can you take a look into why downloading the updates fails sporadically?

dhensby commented 3 weeks ago

This is the line where the error comes from: https://github.com/tediousjs/setup-sqlserver/blob/v2.1.0/src/utils.ts#L199

There's not much logging going on here, so it's hard to know exactly why this is happening.

It could be:

  1. We have a bad status code (ie: error response from the server)
  2. The regex for pulling out the install link is not working.

I'll add a PR to increase logging so we can see what is going on here.

dhensby commented 3 weeks ago

Something I had thought about when first authoring the cumulative updates feature was using the CI cache to hold onto these update URLs to prevent having to repeatedly hit the website for them, but the caching is more for caching files and not arbitrary data (https://github.com/actions/toolkit/tree/main/packages/cache).

arthurschreiber commented 3 weeks ago

Yeah. It would be nice to cache all the installer files, but I guess that can easily bump into the 10GB actions cache limit.

dhensby commented 3 weeks ago

Do the URLs change regularly, or could the action ship with some defaults, which could then be used as a fallback if the check doesn't work?