rondel_92108
09/24/2024, 6:26 PMPOST /api/rest/2.0/vcs/git/commits/deploy API to deploy my TS objects from source control when using a .NET HttpClient. We use this HttpClient to automate the deploy process using Github actions. I get the 500 error whether I use VALIDATE_ONLY or PARTIAL. 500
> {"error":{"message":{"debug":{"code":13000,"incident_id_guid":"e5cf314e-45dc-446d-8055-4a963de80eee","debug":"Index: 1, Size: 1"}}}}
Working with TS support, they were able to find the deploy logs that contain the issue with the objects that couldn't be deployed.
However, if I run the same API using the Playground or even Postman, I am able to get a 200 response with the actual warnings/errors that were a part of the deployment.
The request I am sending from my code is identical
{
"branch_name": "pfload",
"deploy_type": "FULL",
"deploy_policy": "VALIDATE_ONLY"
}
The only thing I can assume is that this is related in some way to a header value?
Here's what my code looks like
builder.Services.AddHttpClient("thoughtspot", client =>
{
client.BaseAddress = new Uri(thoughtspotConfig.InstanceUrl);
client.DefaultRequestHeaders.Add("Accept", "application/json");
client.DefaultRequestHeaders.Add("User-Agent", "payscale-httpclient");
});
...
_httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", bearerToken);
var json = {
"branch_name": "pfload",
"deploy_type": "FULL",
"deploy_policy": "VALIDATE_ONLY"
};
var response = await _httpClient.PostAsync("api/rest/2.0/vcs/git/commits/deploy", new StringContent(json, Encoding.UTF8, "application/json"));
var content = await response.Content.ReadAsStringAsync();
// here I get the response is not successful 500 error
Any ideas what could be causing this different in behavior between user agents?shikharts_67242
09/24/2024, 10:07 PMrondeezie
09/24/2024, 10:39 PMshikharts_67242
09/24/2024, 11:32 PMError while deploying changes : Index: 1, Size: 1
java.util.Collections$SingletonList.get(Collections.java:4817)
com.thoughtspot.callosum.edoc.ImportEPack.processResponseForRelationshipImport(ImportEPack.java:2596)
com.thoughtspot.callosum.edoc.ImportEPack.translateResponseToProto(ImportEPack.java:2496)
com.thoughtspot.callosum.edoc.ImportEPack.makeMetadataChanges(ImportEPack.java:1381)
This looks like an error in the payload from git. Can you follow up with support to get to the relevant team and give this incident id?rondel_92108
09/25/2024, 1:07 PMshikharts_67242
09/25/2024, 3:43 PMsrikanth.jandhyala
09/26/2024, 6:47 AMsrikanth.jandhyala
09/27/2024, 4:21 AMrondel_92108
10/02/2024, 3:05 PM