-
Notifications
You must be signed in to change notification settings - Fork 640
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
GitVersionTask 5.1.0 - Error in Azure Devops private repos: Value cannot be null. Parameter name: source #1883
Comments
@pannikbutton can you check the 5.1.2-beta.1+8 version if it fixes the issue? |
@arturcic I have tried GitVersionTask 5.1.2-beta1.8. However, the same error occurs. Log from Azure Devops using GitVersionTask 5.1.2-beta1.8.txt |
I also tried the 5.1.2-beta.1+8 And I experienced this error on Jenkins
|
FYI using 5.1.2-beta1.8 of GitVersion.Tool passes but GitVersionTask fails. |
@Casz, @pannikbutton can any of you create a repo that reproduces this error? or if it's a public repo I can have a look? |
I think any csproj will do as long as the checkout is done by Jenkins git plugin or Azure DevOps |
I do have a basic GitVersion repo I could share and also confirm that is the case. |
We do have artifacts testing as part of the build pipeline, and we test the msbuild task inside of a container, by running dotnet build, and the pipeline runs on Azure Pipelines, so can it be related to Jenkins? |
and this is the test project https://github.com/GitTools/GitVersion/tree/master/test, that we use when running in pipeline |
Please share it and add steps to reproduce |
Here is the repo Pipeline execution
|
I assume it has something to do with sparse checkout 🤔 |
Cannot repro locally with a sparse checkout. |
Found the issue Not sure how this produces null pointers:
|
@pannikbutton unsure how to repro in Azure, you could try https://github.com/GitTools/GitVersion/pull/1892/files to get a more verbose stack trace |
I too have this issue, I want to provide more information where possible but I was ignored in #1876. If one could explain how to get more verbose logs from the failure, I'd be happy to forward anything. Downgrading to to 5.0.1 works. Updating to any newer version breaks. |
hopefully once we have a nupkg of #1892 you should be able to get the detailed stack trace 😅 |
@pannikbutton, @Casz, @Inzanit, there package with the stack trace enabled was published, can you try it and provide more details of the error? |
@arturcic see my stacktrace: #1883 (comment) |
Upgraded and got the following stack:
Using default checkout options on Azure Pipelines @Casz @arturcic |
Additionally, I also received a
|
@arturcic @Casz @Inzanit After hours of trial and error and pulling out lots of hair, I can confirm the following:
Here are the steps to reproduce the error:
Screenshots of the build history of two repos, one public (repo1), one private (repo5): Here is the log from the pipeline after updating GitVersionTask to 5.1.2-beta1.12 in the private repo: VSBuild Log from Azure Devops using GitVersionTask 5.1.2-beta1.12.txt Here is a link to the public project in Azure Devops, but since this error only occurs in private projects, you won't see it. But you could still have a look around at stuff like change history and the build config in the yaml file because it is an exact copy of the private repo that produces the error. https://dev.azure.com/sandstorm-cloud/Alpha/_build?definitionId=26&_a=summary |
That is a great investigation. It looks like when it runs for a private repo it tries to fetch |
For azure pipeline it should not fetch by default, so I can go continue the investigation, thanks @pannikbutton |
You're welcome, @arturcic. Glad I could be of some help. |
@pannikbutton, @Inzanit, @Casz can you try version 5.1.2-beta.1+18 and confirm it's working for you? |
I can confirm both GitVersionTask and GitVersion.Tool perform as intended now on our Jenkins instance 😄 |
it works! |
@arturcic Green! So much green everywhere! He he.. |
Time to 🚢 📦 🚀 v5.1.2 🥇 |
Thank you all for the quick feedback and the time you spent helping me figuring out the cause of the error |
That's the plan |
This might be related to #1876. But I'm not sure, so I created a new issue.
When building with a VSBuild step inside Azure Devops pipelines, the build fails with this error:
Log from Azure Devops pipeline.txt
As with #1876, downgrading to 5.0.1 is a workaround.
The text was updated successfully, but these errors were encountered: