umbraco / Umbraco.Cloud.Issues

Public issue tracker for Umbraco Cloud
26 stars 2 forks source link

Azure CI/CD pipeline deploys code from before Umbraco cloud sync #828

Open eqtr-ab opened 2 months ago

eqtr-ab commented 2 months ago

Issue description

To replicate:

  1. Set up dictionary item locally, then deploy to Umbraco cloud
  2. Update dictionary item value in Umbraco cloud site
  3. Carry out deployment using Azure CI/CD pipeline

Observe that after the deployment is complete, the dictionary item in Umbraco cloud has changed to the value from before the deployment, even though the Azure repo has been updated with the new value.

See diff content if any:

@@ -6,7 +6,7 @@
   "Translations": [
     {
       "Key": "764fb4c0-c861-49ba-9f40-cb713b7ae3a6",
-      "Value": "Submit self referral form",
+      "Value": "Submit referral ",
       "LanguageIsoCode": "en-GB"
     }
   ],

Apply git patch:

Checking patch src/VistaHealth/umbraco/Deploy/Revision/dictionary-item__764fb4c0c86149ba9f40cb713b7ae3a6.uda...
Applied patch src/VistaHealth/umbraco/Deploy/Revision/dictionary-item__764fb4c0c86149ba9f40cb713b7ae3a6.uda cleanly.
[master e938abad] Adding cloud changes since deployment c532cb80-0f25-49f9-be47-5fac30b2a381 [skip ci]

Dictionary item after deployment:

image

Note that it has been set to the previous value.

Dictionary item in repo:

image

Note that it contains the updated value brought down from Umbraco cloud.

eqtr-ab commented 2 months ago

I've just had the same issue occur with a file which had been deleted from the cloud environment representing a member group - the deleted member group has reappeared on the dev site after being deleted, and the Azure repo has been updated with a commit removing the member group UDA file. This means we need to carry out a second deployment in order to push this change back up.

jesp209i commented 1 month ago

Hi @eqtr-ab We are working on and testing some updated scripts - also for Azure DevOps - they could be of interest for you and they are located in a PR on our Samples repo:

https://github.com/umbraco/Umbraco.Cloud.CICDFlow.Samples/pull/5

With the updated samples we try to handle cloud-sync a little more gracefully and intelligent - and when pulling changes down from cloud, we apply them and use the updated repository as basis for the deployment 🚀

We are still testing the scripts, but my hope is that this will remove most of the friction you have been experiencing.

Kind Regards, Jesper, Umbraco Cloud Team