amzn / amazon-payments-magento-2-plugin

Extension to enable Amazon Pay on Magento 2
https://amzn.github.io/amazon-payments-magento-2-plugin/
Apache License 2.0
109 stars 77 forks source link

setup:upgrade Failing with Amazon_Pay 5.16.1 #1229

Closed tdorchak closed 5 months ago

tdorchak commented 1 year ago

What I expected

After updating to 5.16.1 bin/magento setup:upgrade should run the setup scripts to make database updates.

What happened instead

When upgrading to 5.16.1 from 5.14 the setup:upgrade is failing because the core_config_data table is hardcoded in Setup/Patch/Data/PerformKeyUpgrade.php instead of dynamically adding a table prefix as many merchants do.

Steps to reproduce the issue

  1. Set a prefix on your database tables when installing magento for the first time
  2. Install Amazon_Pay 5.14.x
  3. Update Amazon_Pay by running composer require amzn/amazon-pay-magento-2-module
  4. Run bin/magento setup:upgrade

Your setup

sgabhart22 commented 1 year ago

Hello @tdorchak ,

We are aware of this issue, and the fix is planned to be included in 5.17.0. In the meantime, you can apply the attached patch to address failing upgrade script:

asd-1162.patch.txt

Sorry for the trouble!

Thanks, Spencer

Hjsurk commented 7 months ago

Hi @sgabhart22,

When is 5.17.0 expected to release? Seems like it's been quite a while and this issue still occurs for new customers. I tried to apply the patch above in my local but ran into the following issue: error: Setup/Patch/Data/PerformKeyUpgrade.php: No such file or directory.

~~My files are located here: vendor/amzn/amazon-pay-magento-2-module/Setup/Patch/Data/PerformKeyUpgrade.php~~

Besides that, will this work for my Bitbucket pipeline as the issue is triggering there as well and I currently can't deploy the module because of this.

EDIT: I was able to apply the patch by adding the full directory within the patch. This still doesn't solve the issue for our Bitbucket pipeline though and as such I can't deploy Amazon Pay to our ecommerce store.

Warm regards, Arjen

sgabhart22 commented 7 months ago

Hello again @tdorchak and @Hjsurk , version 5.17.0 of the module is now live. Apologies for the long delay!