-
Notifications
You must be signed in to change notification settings - Fork 210
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
[ALM Accelerator - BUG]: Update build pipeline variables error #6020
[ALM Accelerator - BUG]: Update build pipeline variables error #6020
Comments
Hey Ryan, tough to tell what the issue is here. You're more than likely correct that it has something to do with the payload having some sort of special character in it based on the error. Wonder if you can add
just before the call to Invoke-RestMethod and run it again so we can see the full body of the request. Feel free to send it over to me or @RajeevPentyala |
Hey @mikefactorial @RajeevPentyala Looks like its an issue with any solution starting with N, the path doesnt include the N: "path": "\CCMS Phase 2\Z Data Source and Provider", "path": "\CCMS Phase 2\on Prod Data", |
@ryanhodgson1 I tried with a solution named starting with 'N' and was able to export the solution without any issues. As @mikefactorial mentioned can you share the output of "Write-Host $body"? |
@RajeevPentyala the inital export works fine but after you setup the pipelines it looks for the build and in my case the build pipeline is imbedded in a directory so it has a \ in front of it and replaces \n with blank. Here is the full body: |
@ryanhodgson1 Issue is reproducible when the 'Repository Name' starts with letter N. We will work on the fix. You might want to track the PR if you would like to see the fix before the release. |
@RajeevPentyala thats odd cause my repo name starts with a c at "ccms-nz-data-source-and-provider". For me the only time the issue happens is when the build pipeline path has \n in it and removes it: |
@ryanhodgson1 Fix specified in this PR : https://github.com/microsoft/coe-alm-accelerator-templates/pull/310 should fix the issue. Can you please try by updating your 'update-deployment-settings.ps1' file with the fix from the PR. |
Thanks @RajeevPentyala I applied that and tested it and its working for me now, thanks for your help! |
@ryanhodgson1 This has been fixed in the latest release. Please install the latest version of the toolkit following the instructions for installing updates. Note that if you do not remove the unmanaged layers as described there you will not receive updates from us. |
Describe the issue
I get these errors when doing an export specifically for 2 of my solutions which are called CCMSNonProdData and CCMSNZDataSourceAndProvider_V2:
For CCMSNonProdData i get:
2023-07-07T03:25:12.4265825Z https://sdo-online.visualstudio.com/Te Ara Manaaki/_apis/build/definitions/1460?api-version=6.0
2023-07-07T03:25:13.2589938Z Invoke-RestMethod : {"$id":"1","innerException":null,"message":"TF400898: An Internal Error Occurred. Activity Id:
2023-07-07T03:25:13.2591905Z e60f7bee-0763-4900-956c-09d559bc2a2a.","typeName":"Newtonsoft.Json.JsonReaderException,
2023-07-07T03:25:13.2592926Z Newtonsoft.Json","typeKey":"JsonReaderException","errorCode":0,"eventId":0}
2023-07-07T03:25:13.2594045Z At D:\a\1\PipelineUtils\PowerShell\update-deployment-settings.ps1:505 char:9
2023-07-07T03:25:13.2595133Z + Invoke-RestMethod $buildDefinitionResourceUrl -Method 'PUT' - ...
2023-07-07T03:25:13.2596046Z + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-07-07T03:25:13.2597186Z + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
2023-07-07T03:25:13.2598090Z eption
2023-07-07T03:25:13.2605351Z + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
2023-07-07T03:25:13.7887555Z ##[error]PowerShell exited with code '1'.
For CCMSNZDataSourceAndProvider_V2 i get:
2023-07-07T03:33:39.9415641Z https://sdo-online.visualstudio.com/Te Ara Manaaki/_apis/build/definitions/1533?api-version=6.0
2023-07-07T03:33:40.2672044Z Invoke-RestMethod : {"$id":"1","innerException":null,"message":"This request expects an object in the request body,
2023-07-07T03:33:40.2672511Z but the supplied data could not be
2023-07-07T03:33:40.2673165Z deserialized.","typeName":"Microsoft.TeamFoundation.Build.WebApi.RequestContentException,
2023-07-07T03:33:40.2674715Z Microsoft.TeamFoundation.Build2.WebApi","typeKey":"RequestContentException","errorCode":0,"eventId":3000}
2023-07-07T03:33:40.2675600Z At D:\a\1\PipelineUtils\PowerShell\update-deployment-settings.ps1:505 char:9
2023-07-07T03:33:40.2676184Z + Invoke-RestMethod $buildDefinitionResourceUrl -Method 'PUT' - ...
2023-07-07T03:33:40.2676822Z + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-07-07T03:33:40.2677482Z + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
2023-07-07T03:33:40.2677924Z eption
2023-07-07T03:33:40.2678376Z + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
2023-07-07T03:33:40.3562743Z ##[error]PowerShell exited with code '1'.
They seem to be failing on this line in the update-deployment-settings.ps1 file:
For some reason its struggling to set the variables on the build pipeline.
This seems related to this old ticket too: #2011
Expected Behavior
For the build pipeline variables to be set without issue
What component are you experiencing the issue with?
ALM Accelerator Pipelines
What solution version are you using?
1.0.20230606.1
Steps To Reproduce
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: