microsoft / coe-starter-kit

Other
739 stars 216 forks source link

[ALM Accelerator - Bug] Import of Managed Solution failed for Environment Variables with type string, double, and secret (AKV). #8720

Open Srikanth-Singapuram opened 1 month ago

Srikanth-Singapuram commented 1 month ago

What is your question?

Hello Everyone,

I am encountering the issue with the AKV Secrete and other string Environment Variables when configuring these values in the Environment Configure of the "Power platform ALM Accelerator" canvas app. However, when I modify the values in the deployment setting file and commit the changes to the branch, it functions properly.

To resolve this problem, is it necessary to manually modify the value in the deployment setting file after configuring it through the ALM Accelerator app? I am currently utilizing the most recent version of ALM Accelerator (1.0.20240305.1).

Please provide instructions on how to proceed it from app without changing the deployment setting file manually.

Here is the same issue which was reported earlier 4477 and 4328 Here is the example

@RajeevPentyala @CoEStarterKitBot

It is not working

{ "EnvironmentVariables": [ { "SchemaName": "nfdemo_testField", "Value": "#{environmentvariable.nfdemo_testField}#" } ],

}

Manually updating the deployment setting file results in it functioning properly.

{ "EnvironmentVariables": [ { "SchemaName": "nfdemo_testField", "Value": "mytest" } ],

}

image

What component are you experiencing the issue with?

ALM Accelerator Canvas App

What solution version are you using?

1.0.20240305.1

AB#3914

MaheshSripada commented 1 month ago

Hi @Srikanth-Singapuram,

We will look into this and update you.

MaheshSripada commented 1 month ago

Hi @Srikanth-Singapuram,

Can you pls let us know if the

1) If EV has a default value and values are set for all environments using the ALM App Deployment Setting screen. 2) Check if the pipeline deploy-EnvName-SolutionName in Devops has variables values set correctly by clicking on Edit Pipeline ==> Variables.

Srikanth-Singapuram commented 1 month ago

@MaheshSripada, I appreciate your response. The issue has been fixed. Please close the ticket.

Mushrem77 commented 1 month ago

Hello, I am having the same issue, all of my environments are set up in the ALM Accelerator, but i can not find the pipeline in my DevOps to check the variables.

How did you resolve this issue without hardcoding the outputs ?

Srikanth-Singapuram commented 1 month ago

@Mushrem77 Ensure that the environment variables set in the App (AML Accelerator) are properly committed and pushed to the pipeline variables. When deploying the solution, verify that the correct pipeline is triggered, one that includes the necessary environment variables. It is crucial that both the commit and build pipelines are consistent. Additionally, please consider the following points for a successful deployment.

  1. Environment Variable of type string ONLY has this issue (EV referencing secrets to the key vault worked fine)
  2. Make sure both the Default and Current Value is provided (May work without Current Value)
  3. AND make sure the Environment Variable's value is added to the Deployment Configuration Settings on the ALM Canvas App. (This is the key)
  4. You could review the deploy-- pipeline to check if the value for the Env. Variables appear. Go to the pipeline - Edit Pipeline - Click on Variables. (If this value appears here, you should be fine with deployment to environments)