microsoft / coe-starter-kit

Other
763 stars 225 forks source link

[CoE Starter Kit - BUG] Developer environment in AdminMode causing errors in Inventory flows #9230

Open mjonck opened 2 weeks ago

mjonck commented 2 weeks ago

Does this bug already exist in our backlog?

Describe the issue

My tenant includes a developer environment which is currently in administration mode as it got automatically disabled due to inactivity - see below screenshot of the environment in ppac: Image

CoE has inventorized this environment correctly (I see that the Environment Runtime State is set to AdminMode in the admin_environment table), but the different inventory workflows (for Flows, PVA, Apps, etc.) are all failing on this Environment when they try to get all resources from the environment. The action "List Flows as Admin (V2)" (in the flow "Admin | Sync Template v4 (Flows)") for example gives following error:

The Dynamics 365 organization you are attempting to access is currently disabled. Please contact your system administrator.

Image

I notice that the condition "Check if Environment is deleted or excused" - which present in all of the Inventory flows for Flows, PVA, Apps, ... is not filtering out this environment. Should this one be updated to exclude environments that are in AdminMode?

Expected Behavior

No response

What solution are you experiencing the issue with?

Core

What solution version are you using?

4.43

What app or flow are you having the issue with?

Admin | Sync Template v4 (Flows)

What method are you using to get inventory and telemetry?

Cloud flows

Steps To Reproduce

No response

Anything else?

No response

Jenefer-Monroe commented 2 weeks ago

Hello, in the past at least this has resulted in a change to the Environment Runtime State not just admin mode. And we could gather information about environments in admin mode as long as there runtime state was still going.

Can you please check what is the value for Environment Runtime State. Image

Then also open the Admin | Sync Template v4 (Flows) flow in edit mode and make sure you have this clause at the top. Image

mjonck commented 2 weeks ago

I understand, would indeed still make sense to be able to also gather information about environments in admin mode. However, as the actions to get the resources (like the "List Flows as Admin" - see screenshot in my initial post) are throwing error when environment is in admin mode, not sure if that is feasible then?

The environment's Runtime is showing as "AdminMode" - see below (and indeed in the flow I have the mentioned condition present): Image

Image

Jenefer-Monroe commented 2 weeks ago

Looks like the product team added another option for the value, or we just didnt know about that option.

I think if you change that to be is not equal to Enabled then it should work for you.

Please do let me know. If so I can flag this as something to fix up in an upcoming build.

mjonck commented 1 week ago

I can confirm that changing the condition that way is now ensuring the flow is terminated.

Jenefer-Monroe commented 1 week ago

Great thank you! I'll mark this as something to fix then in an upcoming relesae.

Jenefer-Monroe commented 5 days ago

Change in "check if can be retrived" condition to say runtimestate - is not equal to - Enabled

Done in V1 and V2 architecture for: