microsoft / coe-starter-kit

Other
743 stars 219 forks source link

[CoE Starter Kit - BUG] Cannot upgrade CoE #8507

Closed hilda-hk closed 3 months ago

hilda-hk commented 3 months ago

Does this bug already exist in our backlog?

Describe the issue

Solution "Center of Excellence - Core Components" failed to import: ImportAsHolding failed with exception :Import failed: The DELETE statement conflicted with the REFERENCE constraint "connector_connectionreference". The conflict occurred in database "db_crmcoreapac_20211213_12490892_5642", table "dbo.connectionreferenceBase", column 'CustomConnectorId'. The statement has been terminated.

Expected Behavior

Solution "Center of Excellence - Core Components" should be imported successfully.

What solution are you experiencing the issue with?

Core

What solution version are you using?

4.32.2

What app or flow are you having the issue with?

Solution

What method are you using to get inventory and telemetry?

None

Steps To Reproduce

No response

Anything else?

![Uploading Screenshot 2024-06-19 135926.png…]()

AB#3626

hilda-hk commented 3 months ago

Also, I have removed all the solution layer for CoE Flows in CoE Admin Command Center.

Jenefer-Monroe commented 3 months ago

Unfortunately it looks like you've hit a product bug around upgrade. A few other people have hit this too. Please see https://github.com/microsoft/coe-starter-kit/issues/8466.

The connection

This is likely the legacy Dataverse connection that is at play, why it wont tell you the name I don’t know. But this is a connection that we have removed from the kit and that is causing issues in the product’s upgrade code.

The likely issue

The issue is around dependency ordering. Flow X uses Connection Y Both Flow X and Connection Y are deleted as part of the upgrade The product is attempting to delete Connection Y before Flow X, which is cannot do.

Find impacted flows

Please go to the default solution > connection references > look at the dependencies for both of these connection references image image

How to work around the bug

As a result, in order to upgrade you will break the dependencies. You will need to:

  1. Delete the _Upgrade solution (if one was left behind)
  2. Open all the flows above, delete most of whats in them, and resave
  3. Do this until the connection reference no longer shows dependencies
  4. Try the upgrade again

    Step 2 example

    Example of how to do the workaround for one of the flows: image

    Thats just awful!

    Yes I apologize for the hassle. The product team is aware of this issue but the fix has not yet come out. And another user has succeeded with this workaround. See https://github.com/microsoft/coe-starter-kit/issues/8466

hilda-hk commented 3 months ago

but my error message is not same as #8466

hilda-hk commented 3 months ago

I tried to follow your guide, but failed with the same error messages I got previously.

Jenefer-Monroe commented 3 months ago

Its a connection reference, but perhaps a different one. Sorry I may not be able to assist as this is a product bug you've hit. We just happened to be able to get around the other one as multiple people hit it and were able to debug.

Do you have the audit logs solution installed? If so, you may need to follow the steps outlined here: https://github.com/microsoft/coe-starter-kit/issues/6018

Deprecated custom connector

We have deprecated the custom connector technique to gather Audit Logs due to several issues like lack of pagination and upgrade issues with custom connectors. You will need to follow the steps outlined in https://github.com/microsoft/coe-starter-kit/issues/6018 in order to proceed. In short:

  1. Delete _upgrade
  2. Delete Audit Logs solution and any other dependencies
  3. Try your upgrade of Core again
  4. Setup new Audit Logs collection technique These are explained more deeply in the referenced bug.
hilda-hk commented 3 months ago

Thanks for the reply. May I know do I need to remove the actions inside the final scope? image

I tried to remove all the actions, except the trigger and some actions without connection reference. image

hilda-hk commented 3 months ago

When I import the solution, this message comes in. Not sure if it is acceptable or not. image

Jenefer-Monroe commented 3 months ago

I don't think its the regular dataverse connector that is causing you issue, its the legacy one. From looking at your error message again though as you say, I'm not sure thats it at all. Its complaining about product tables regrading custom connectors. Thats why I pointed you to this one instead. https://github.com/microsoft/coe-starter-kit/issues/6018

However if you are on 4.22 (Jan 2024) then you must have already overcome the audit logs deprecation.

Did you isntall manually? Meaning through the product UX as opposed to using the pac-cli or ALM accelerator or somethign like that.

hilda-hk commented 3 months ago

Thank you so much for your great help from #6018. I dont have the Delete _upgrade and I deleted the Center of Excellence - Audit Logs solution. image

May I know how to install back it? I cannot find it from the June 2024 zip file. image

Jenefer-Monroe commented 3 months ago

Did you isntall manually? Meaning through the product UX as opposed to using the pac-cli or ALM accelerator or somethign like that.

hilda-hk commented 3 months ago

yes I installed it manually. I directly import the zip file under the solution page.

Jenefer-Monroe commented 3 months ago

I'm afraid I just am not able to help here. These are not tables that have to do with the CoE Starter Kit. You may need to contact product support.

Jenefer-Monroe commented 3 months ago

closing out as no further action for starter kit team