Backport fix for nuget packaging during build#868
Conversation
|
Even without passing the version to the pack command, it is not using the hardcoded 99.99.99 version on pipeline builds ex: https://mssqltools.visualstudio.com/CrossPlatBuildScripts/_build/results?buildId=201942&view=logs&j=ad533c73-7a95-5e12-cf66-f0b3921575e3&t=3da72317-fc95-51b8-57c3-d32106c04e6 |
|
Huh, good point on the version. For some reason the PR builds seem to be different - see https://mssqltools.visualstudio.com/CrossPlatBuildScripts/_build/results?buildId=201745&view=logs&j=f9f7e0bb-717e-5ea9-5f1c-3ee3ad57f3f6&t=6a5360e1-b584-59ac-4f6e-ca10047a7989 Let me keep looking... |
|
Right, yeah so this was something that was changed/broken with your PR #853 where you changed the package to be generated by calling dotnet pack directly. Because of this it wasn't passing in the version - so defaulted to 99.99.99 Notice that we're now getting a bunch of warnings like this :
For the product build pipeline this worked by coincidence - since the version we were looking for is always going to be higher than any released version it should always default to 99.99.99 and pick up the correct package. But for the PR pipeline we hardcode it to 1.0.0 - https://github.com/Azure/azure-functions-sql-extension/blob/main/builds/azure-pipelines/build-pr.yml#L48 This means it then resolves to one of the released versions, see https://mssqltools.visualstudio.com/CrossPlatBuildScripts/_build/results?buildId=201745&view=logs&j=f9f7e0bb-717e-5ea9-5f1c-3ee3ad57f3f6&t=6a5360e1-b584-59ac-4f6e-ca10047a7989
Which is a big bug since it means we're testing against the released version of the package (for the OOP tests only though). I noticed this because it completely failed on the trigger branch since that version of the package didn't have the trigger bindings. |
|
You're right that clearing the nuget cache is only really relevant for local dev scenarios (since the agent machines shouldn't have anything cached). But it doesn't hurt to do it and is what we should have done in the first place. |
|
I'm going to change the PR builds to use 99.99.99 as well. This should prevent issues like that from silently failing in the future - and since this isn't an actual build we intend to possibly release it's better to make that clear. |
Ohh so the version needs to be passed, thanks @charles for looking into it and for addressing the bug introduced by #853. |
* Backport fix for nuget packaging during build * Use 99.99.99 version for PR builds
Fixes two issues:
See #868 (comment) for full explanation of why this wasn't caught earlier and what issues it causes.