group-membership-management
group-membership-management copied to clipboard
Unable to execute pipeline
We are trying to build GMM as per your blog ,while at the execution of pipeline we are getting some errors.Please find below the error messages:-
##[error]Error: The process 'C:\hostedtoolcache\windows\dotnet\dotnet.exe' failed with exit code 1 ##[error]Dotnet command failed with non-zero exit code on the following projects : D:\a\1\2.0.2210.2\Service\GroupMembershipManagement\Hosts\JobTrigger\Services.Tests ##[warning]RetryHelper encountered task failure, will retry (attempt #: 2 out of 3) after 4000 ms Pipleline log.pdf
Hi @ChallaSailendra ,
We are working on pushing out a new update to our public repo soon that would resolve this issue. But in the meantime, to fix this issue: "The total line coverage is below the specific 93" Update that value for JobTrigger coverageThreshold within your vsts-cicd.yml file from 93 to 89: - function: name: 'JobTrigger' coverageThreshold: 89
Hi Daniello,
Still we are facing the same issue ,attaching the logs for your reference logs_46.zip logs_46.zip
Hi @danielluo-msft,
We run the pipeline, below is the screenshot of the pipeline results. Can you help why last 2 activities in pipeline skipped.
And also help me output of the pipeline if pipeline succeeded.
Hi @danielluo-msft,
We run the pipeline, below is the screenshot of the pipeline results. Can you help why last 2 activities in pipeline skipped. pipeline and And also help me output of the pipeline if pipeline succeeded.
Attaching the logs for your reference. logs_46.zip
Hi @danielluo-msft,
We run the pipeline, below is the screenshot of the pipeline results. Can you help why last 2 activities in pipeline skipped. pipeline and And also help me output of the pipeline if pipeline succeeded.
Attaching the logs for your reference.
logs_46.zip
Looking for some help for the above errors.
Hi @ChallaSailendra,
Looking at the logs the issue seems to be similar as the one described by @danielluo-msft for the code coverage.
You might need to update the value of coverageThreshold within your vsts-cicd.yml file for your functions. Based on the numbers from your logs, I will suggest these:
GraphUpdater - 70 SecurityGroup - 80 JobScheduler - 40
Regarding AzureTableBackup the error message is "Project file(s) matching the specified pattern were not found." It seems there might be files missing for this function in your directory.
FYI: AzureTableBackup function has been renamed to AzureMaintenance in the latest version.
Hi Alrios,
Thank you for your response, As you suggested made the changes and execute the pipeline. Successfully moved forwarded now we are seeing different error .
Sharing the logs.
Hi Alrios,
We renamed AzureTableBackup with AzureMaintenance and update the value as suggested and rerun the pipeline .
Expect NonProd_int all other jobs are executed successfully .Could you please help me sharing the logs for your reference
Hi Team,
Looking for your support hand on the issue
Hi @ChallaSailendra ,
I see you renamed the AzureTableBackup function, my intention was just to let you know the function has been renamed in the latest version, manually renaming it is not necessary. I am sorry for the confusion.
Based on the screenshot and the logs provided, I noticed a couple of things:
You are using the "int" environment for this deployment based off of your main branch, note that the deployment condition for "int" expects the branch to be "develop". You would need to update the condition to replace "develop" or add "main", similar to UA.
INT eq(variables['Build.SourceBranch'], 'refs/heads/develop')
UA in(variables['Build.SourceBranch'], 'refs/heads/master', 'refs/heads/main')
The other thing, you are using the default names "gmm" and "int", which might cause name collisions.
Hi Alrios ,
Thank you for your help..we made the changes and executed them again, but still we see some error messages hope you can help us to resolve it . Attach the logs and screenshots.
HI Team,
Any suggestions for the above errors
Hi @ChallaSailendra,
It looks like there is an issue with the deployment on the Azure side so there isn't enough details in the DevOps side to be able to determine the cause. Can you go to your resource group for GMM (start with the data resource group) and take a look at the "Deployments" blade on the left side for that resource group? That should provide more details on the issue so you can know what failed in the deployment.
Hi Danielluo,
Thanks for you reponse,Verified in deployment tab "{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"VaultNotFound","message":"The specified vault 'gmm-data-int' could not be found. This error can happen if the vault was placed in a recoverable state by deleting the vault. Ensure that either the vault was successfully created or that it is not in a recoverable state. To view the vaults in recoverable state you can follow this link https://go.microsoft.com/fwlink/?linkid=2149745 and recover the vault."}]}"
Hi Team,
Waiting for your support.
Hi @ChallaSailendra,
Most likely the keyvault was not created, as I mentioned earlier, the default environment names 'int', 'ua', 'prodv2' must not be reused since some resources like KeyVaults have global unique names, if another person is already using gmm-data-int, no one else would be able to reuse that name.
See GMM Environments for more information.
HI Team,
Thank you for all your support, we are able to deploy all the configurations in the environment. When we onboarded a schedule job ,getting below error message in the logs. Caught unexpected exception in Part# 2, marking sync job as errored. Exception: System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized). at Microsoft.Azure.WebJobs.Extensions.DurableTask.DurableOrchestrationContext.CallDurableTaskFunctionAsync[TResult](String functionName, FunctionType functionType, Boolean oneWay, String instanceId, String operation, RetryOptions retryOptions, Object input, Nullable`1 scheduledTimeUtc) in D:\a_work\1\s\src\WebJobs.Extensions.DurableTask\ContextImplementations\DurableOrchestrationContext.cs:line 739 at Microsoft.Azure.WebJobs.Extensions.DurableTask.DurableOrchestrationContext.ScheduleDurableHttpActivityAsync(DurableHttpRequest req) in D:\a_work\1\s\src\WebJobs.Extensions.DurableTask\ContextImplementations\DurableOrchestrationContext.cs:line 308 at Microsoft.Azure.WebJobs.Extensions.DurableTask.DurableOrchestrationContext.Microsoft.Azure.WebJobs.Extensions.DurableTask.IDurableOrchestrationContext.CallHttpAsync(DurableHttpRequest req) in D:\a_work\1\s\src\WebJobs.Extensions.DurableTask\ContextImplementations\DurableOrchestrationContext.cs:line 271 at Hosts.SecurityGroup.OrchestratorFunction.RunOrchestratorAsync(IDurableOrchestrationContext context) in D:\a\1\2.0.2301.2\Service\GroupMembershipManagement\Hosts\SecurityGroup\Function\Orchestrator\OrchestratorFunction.cs:line 122 location_s SecurityGroup DryRun_s False slot_s Production event_s RunOrchestratorAsync operation_s OrchestratorFunction Type ApplicationLog_CL
Hi @ChallaSailendra
Based on your logs, SecurityGroup function is failing when calling MembershipAggregator function, it is getting a 401 (Unauthorized) code, for context when SecurityGroup calls the MembershipAggregator function, a function key must be passed as part of the url in order to authorize that call. Please verify that the function key that SecurityGroup is using is correct following this steps.
- Go to your MembershipAggregator function
- This is the MembershipAggregator function key, we need to verify that the default function key is the one being used by the SecurityGroup function.
- Go to your SecurityGroup function
- In the Configuration section, edit this setting "membershipAggregatorFunctionKey" it will have a value similar to this one @Microsoft.KeyVault(SecretUri=https://gmm-data-test.vault.azure.net/secrets/membershipAggregatorFunctionKey/a321a335210b4c98976b05bf7d2775c0) The last section of the value indicates the version of the secret that is being used, in this case it is: "a321a335210b4c98976b05bf7d2775c0"
- Now we need to verify the actual value of that secret in your data keyvault.
Open your
<gmm>-data-<env>
keyvault and navigate to SecretsOpen your "membershipAggregatorFunctionKey" secret, you might see different versions, something like this.
Locate the version that SecurityGroup is using (from Step 4) and show the secret value. The value displayed here must match that one from Step 2 in order to work.
If they don't match, try redeploying your code that should update the function keys accordingly.
Hi Team,
Thank you for the help, We verified and made changes as proposed. Now when we are executing the script "New-GmmSecurityGroupSyncJob" getting below errors .
Please find the attachment of error message.
Get-AzADGroup : Cannot process argument transformation on parameter 'ObjectId'. Cannot convert value "[{"type":"SecurityGroup"" to type "System.Guid". Error: "Expected {0xdddddddd, etc}." At line:120 char:79
- ... uery.Split(",") | ForEach-Object { Get-AzADGroup -ObjectId $_ } | For ...
-
~~
- CategoryInfo : InvalidData: (:) [Get-AzADGroup], ParameterBindingArgumentTransformationException
- FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-AzADGroup