humanmade / aws-analytics

AWS Pinpoint analytics for WordPress
https://www.altis-dxp.com/
19 stars 1 forks source link

Load images when Gaussholder is active. #531

Closed robindevitt closed 1 year ago

robindevitt commented 1 year ago

Related issue - https://github.com/humanmade/product-dev/issues/1246 Gaussholder functionality was added in - https://github.com/humanmade/Gaussholder/pull/71

This PR introduces the fix for when Gaussholder is active and the images don't load in Experience Blocks as well as when previewing a page.

Video showing the issue resolved

https://user-images.githubusercontent.com/16571365/198225048-2803259f-2166-4cca-b9e5-ac4c7fc8e711.mov

shadyvb commented 1 year ago

@robindevitt can you update the preview script here as well: https://github.com/humanmade/aws-analytics/blob/638c72f8beba7f28e55d07759aa698feff19020c/src/preview/altis-xb-preview.js#L62 , should be relatively the same as the ab-test-preview.js file.

robindevitt commented 1 year ago

@shadyvb I have pushed up the suggestion 👍🏼

I'm unsure if I should backport this too?

shadyvb commented 1 year ago

@robindevitt I think the changes need to be backported, but not the one I suggested since it doesn't exist in previous versions yet, so might need to manually backport it to work.

roborourke commented 1 year ago

@robindevitt thanks, good to merge and backport now.

The automated backport will fail but you can use it to get instructions for the manual process. If you make the manual backport PR against the latest release branch then you can add the additional backport labels to that manual PR. "Backporting the backport" essentially!

hm-backport[bot] commented 1 year ago

The backport to v4-4-branch failed:

Commits ["638c72f8beba7f28e55d07759aa698feff19020c","9c1f421c6e085b4d341312812ec2a277238e41bb","f883c68cc94869f0a08a9c8d6dedbc9ce120c721","1eb6a9d92feaf39fb72769cc86e2dd33f8138364","212fda722c4126d21534389f49cb799c4359bf7d","125fe9bf53b1e0962208939680968d2db4c7ab93","4be79e2b73dc8beee49a99284a4a05b6117840a3"] could not be cherry-picked on top of v4-4-branch

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport v4-4-branch
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick 638c72f8beba7f28e55d07759aa698feff19020c 9c1f421c6e085b4d341312812ec2a277238e41bb f883c68cc94869f0a08a9c8d6dedbc9ce120c721 1eb6a9d92feaf39fb72769cc86e2dd33f8138364 212fda722c4126d21534389f49cb799c4359bf7d 125fe9bf53b1e0962208939680968d2db4c7ab93 4be79e2b73dc8beee49a99284a4a05b6117840a3
# Create a new branch with these backported commits.
git checkout -b backport-531-to-v4-4-branch
# Push it to GitHub.
git push --set-upstream origin backport-531-to-v4-4-branch
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport

Then, create a pull request where the base branch is v4-4-branch and the compare/head branch is backport-531-to-v4-4-branch.

hm-backport[bot] commented 1 year ago

The backport to v4-5-branch failed:

Commits ["638c72f8beba7f28e55d07759aa698feff19020c","9c1f421c6e085b4d341312812ec2a277238e41bb","f883c68cc94869f0a08a9c8d6dedbc9ce120c721","1eb6a9d92feaf39fb72769cc86e2dd33f8138364","212fda722c4126d21534389f49cb799c4359bf7d","125fe9bf53b1e0962208939680968d2db4c7ab93","4be79e2b73dc8beee49a99284a4a05b6117840a3"] could not be cherry-picked on top of v4-5-branch

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport v4-5-branch
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick 638c72f8beba7f28e55d07759aa698feff19020c 9c1f421c6e085b4d341312812ec2a277238e41bb f883c68cc94869f0a08a9c8d6dedbc9ce120c721 1eb6a9d92feaf39fb72769cc86e2dd33f8138364 212fda722c4126d21534389f49cb799c4359bf7d 125fe9bf53b1e0962208939680968d2db4c7ab93 4be79e2b73dc8beee49a99284a4a05b6117840a3
# Create a new branch with these backported commits.
git checkout -b backport-531-to-v4-5-branch
# Push it to GitHub.
git push --set-upstream origin backport-531-to-v4-5-branch
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport

Then, create a pull request where the base branch is v4-5-branch and the compare/head branch is backport-531-to-v4-5-branch.

hm-backport[bot] commented 1 year ago

The backport to v4-6-branch failed:

Commits ["638c72f8beba7f28e55d07759aa698feff19020c","9c1f421c6e085b4d341312812ec2a277238e41bb","f883c68cc94869f0a08a9c8d6dedbc9ce120c721","1eb6a9d92feaf39fb72769cc86e2dd33f8138364","212fda722c4126d21534389f49cb799c4359bf7d","125fe9bf53b1e0962208939680968d2db4c7ab93","4be79e2b73dc8beee49a99284a4a05b6117840a3"] could not be cherry-picked on top of v4-6-branch

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport v4-6-branch
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick 638c72f8beba7f28e55d07759aa698feff19020c 9c1f421c6e085b4d341312812ec2a277238e41bb f883c68cc94869f0a08a9c8d6dedbc9ce120c721 1eb6a9d92feaf39fb72769cc86e2dd33f8138364 212fda722c4126d21534389f49cb799c4359bf7d 125fe9bf53b1e0962208939680968d2db4c7ab93 4be79e2b73dc8beee49a99284a4a05b6117840a3
# Create a new branch with these backported commits.
git checkout -b backport-531-to-v4-6-branch
# Push it to GitHub.
git push --set-upstream origin backport-531-to-v4-6-branch
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport

Then, create a pull request where the base branch is v4-6-branch and the compare/head branch is backport-531-to-v4-6-branch.

robindevitt commented 1 year ago

@roborourke I added the labels and the backports have indeed failed and looking pretty messy to try and resolve. any tips of reverting to go with manual backport?

roborourke commented 1 year ago

I'm not sure I follow? There's nothing to revert. Sometimes a backport isn't straightforward but it should be possible to work out, in this instance I think it's just one of the preview files that doesn't exist in the v4-6 branch? Or are there more issues than that?

If you start with a manual backport to the v4-6-branch then the resulting PR can be backported automatically rather than this one.