microsoft / coe-starter-kit

Other
737 stars 216 forks source link

[CoE Starter Kit - BUG] Setup Wizard does not persist Power Platform Region/Cloud setting #5626

Closed GU-VITA closed 1 year ago

GU-VITA commented 1 year ago

Does this bug already exist in our backlog?

Describe the issue

When using the Setup Wizard, in the Configure mandatory settings channel, the value for the Power Platform Region/Cloud setting is always reverted back to Commercial.

Same issue with the Production Environment setting is always reverted back to yes

Expected Behavior

All values should be persisted when upgrading the Core solutions.

What solution are you experiencing the issue with?

Core

What solution version are you using?

4.8

What app or flow are you having the issue with?

CoE Setup Wizard (Preview)

What method are you using to get inventory and telemetry?

Cloud flows

Steps To Reproduce

  1. Connect to the COE
  2. Run the CoE Setup Wizard as an upgrade
  3. Settings are not persisted

Anything else?

[CoE Starter Kit - BUG] Setup Wizard does not set ProductionEnvironment variable value #5598

Jenefer-Monroe commented 1 year ago

Hello. We have fixed the ProductionEnvt one for June with https://github.com/microsoft/coe-starter-kit/issues/5598. Cloud type will be more difficult as we dont actually store that. I'm working on another change in that area so let me sit on this for a few days and see if I can think of something clever and easy.

GU-VITA commented 1 year ago

The Region/Cloud could just be another environment variable in the Core solution

From: Jenefer Monroe @.> Sent: Thursday, May 25, 2023 5:59 AM To: microsoft/coe-starter-kit @.> Cc: Urena, Gilles (VITA) @.>; Author @.> Subject: Re: [microsoft/coe-starter-kit] [CoE Starter Kit - BUG] Setup Wizard does not persist Power Platform Region/Cloud setting (Issue #5626)

Hello. We have fixed the ProductionEnvt one for June with #5598https://github.com/microsoft/coe-starter-kit/issues/5598. Cloud type will be more difficult as we dont actually store that. I'm working on another change in that area so let me sit on this for a few days and see if I can think of something clever and easy.

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/coe-starter-kit/issues/5626#issuecomment-1562625501, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A4QVTPUMVHLKF423IDVV2VDXH4UO3ANCNFSM6AAAAAAYNU3B2I. You are receiving this because you authored the thread.Message ID: @.***>

Jenefer-Monroe commented 1 year ago

Yes that is the direction we would go, but its not as simple as that due to other requirements. We'll see what we can do.

Jenefer-Monroe commented 1 year ago

OK I got this to work without another env var to manage. Luckly the power app maker url is unique in the clouds so I have done the following on the onstart. The collection was already present, I'm just looking up to see which one was entered for maker to see what cloud it is.

    // Get a list of URLs for each region/cloud.
    ClearCollect(
        colRegionClouds,
        Table(
            {
                region: "Commercial (Default)",
                makerUrl: "https://make.powerapps.com/",
                appUrl: "https://apps.powerapps.com/",
                graphUrl: "https://graph.microsoft.com/",
                automateUrl: "https://flow.microsoft.com/manage/environments/",
                audienceUrl: "https://manage.office.com",
                authorityUrl: "https://login.windows.net"
            },
            {
                region: "GCC",
                makerUrl: "https://make.gov.powerapps.us/",
                appUrl: "https://play.apps.appsplatform.us/",
                graphUrl: "https://graph.microsoft.com/",
                automateUrl: "https://gov.flow.microsoft.us/manage/environments/",
                audienceUrl: "https://manage-gcc.office.com",
                authorityUrl: "https://login.windows.net"
            },
            {
                region: "GCC High",
                makerUrl: "https://make.high.powerapps.us/",
                appUrl: "https://apps.high.powerapps.us/",
                graphUrl: "https://graph.microsoft.us/",
                automateUrl: "https://high.flow.microsoft.us/manage/environments/",
                audienceUrl: "https://manage.office365.us",
                authorityUrl: "https://login.microsoftonline.us/"
            },
            {
                region: "DoD",
                makerUrl: "https://make.apps.appsplatform.us/",
                appUrl: "https://play.apps.appsplatform.us/",
                graphUrl: "https://dod-graph.microsoft.us/",
                automateUrl: "https://flow.appsplatform.us/manage/environments/",
                audienceUrl: "https://manage.protection.apps.mil",
                authorityUrl: "https://login.microsoftonline.us/"
            }
        )
    );

    //get the current cloud, default to Comercial if none specified
    Set(
        myRegionCloud,
        First(Filter(colRegionClouds, makerUrl = 
        Coalesce(LookUp('Environment Variable Values', 'Environment Variable Definition'.'Schema Name' = "admin_PowerAppEnvironmentVariable").Value, 
        "https://make.powerapps.com/")
        )));
CoEStarterKitBot commented 1 year ago

@GU-VITA 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.