-
Notifications
You must be signed in to change notification settings - Fork 157
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
[bug] Get-VSTeamBuild throws a "NullReferenceException" on 7.0.0 runing in AzDo hosted agent #353
Comments
Another strong clue is that $resp seems to contain only a HTML dump. Can see AzDO Sign in page at the top of this. |
Can you reproduce it on any project or another Org? Also stupid question: Your PAT has the right scopes? |
@SebastianSchuetze : Yes run it on two different AzDo orgs... it's not using PAT but System.AccessToken of the hosted agent. My testing is done with PAT locally and 19 of 20 times there is no problem. |
I guess it is the cleaner fresh environment on the agent that makes it more "stable" or reproducable. Which is good. Because it works on your (dev) machine. 😄 |
Thanks so much for taking the time to report. So sorry for the trouble. I will resurface triggerInfo for you and start working on a fix. |
I noticed that Trigger info is an empty object on all my tests. What were you expecting to find? |
@DarqueWarrior : It's a feature of multi-repo trigger support in YAML build. https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops So I had to write code to fetch TriggerInfo on my own, and then write custom git checkout logic that works with the repo that triggers the build and not the repo where the build yaml resides. |
Ah! Good to know you are using YAML. I am using classic for my testing and it is still failing but I will test with YAML as well. That might populate the triggerInfo so I can test that as well. Good news I am able to duplicate. |
I have been using this on 6.5.1 in production for some time. With TriggerInfo and all. Excellent you managed to reproduce. Example from build YAML:
|
I think I found the crash. The Queue is not set while the build is in progress. |
The fix is running through the pipeline now. Will merge and publish as soon as everything is green. Thanks again for reporting this. |
* Fixing bug #353 * Bringing code coverage back to 100% * Added TriggerInfo to vsteam_lib.Build * Updated version to 7.0.1 and changelog
Fixed in 7.0.1 which is rolling out now. |
Hey, @mortenlerudjordet 7.0.1 is now live. Let me know if that fixed your issue for you. |
@DarqueWarrior : No more crashes in my dev env...so seems good to go. Also exposing TriggerInfo in the original way. |
Using 7.0.0 on a AzDo hosted agent running windows-latest (and vs2017-win2016) image Get-VSTeamBuild always crashes in an unhandled exception.
Downgrading to 6.5.1 and the error goes away.
I have only managed to get the crash debugging locally one time on 7.1(p7). Have tried both 7.1 and 7.0.3 without managing to reproduce locally.
In addition I see that the object structure have changed in the return from Get-VSTeamBuild.
Previous I could do $BuildInfo.triggerInfo, now this seems to be under $BuildInfo.InternalObject.triggerInfo in 7.
Steps to reproduce
Expected behavior
Actual behavior
Environment data
OS
Server
The text was updated successfully, but these errors were encountered: