Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

magento/magento2#35706 Remote storage issue #35706 #36039

Merged

Conversation

monteshot
Copy link
Contributor

@monteshot monteshot commented Aug 26, 2022

Description (*)

  • Created new ImageFactory class that is refactored service class Zend_Pdf_Resource_ImageFactory for using external S3 Storage images in invoice

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes Remote storage issue #35706

Manual testing scenarios (*)

  1. Install any S3 compatible storage (locally)
    1.1
wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio

1.2 Start MinIO. For example:
MINIO_ROOT_USER=monteshot MINIO_ROOT_PASSWORD=monteshot ./minio server /home/monteshot/minio/magento --console-address ":9901" --address ":9801"

1.3 Create your bucket
image
1.4 Connect Application to S3 Storage
bin/magento setup:config:set \ --remote-storage-driver="aws-s3" \ --remote-storage-endpoint="http://127.0.0.1:9801" \ --remote-storage-region="ua-shostka-1" \ --remote-storage-bucket="magecd" \ --remote-storage-key="magecd12" \ --remote-storage-secret="magecd12" \ --no-interaction
1.5 Run Sync
bin/magento remote-storage:sync
2. Go to configuration and add image as discribed in Task
image
#35706 (comment)
3.
Check the PDF invoice w/o exception
image

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

- Created new ImageFactory class that is refactored service class Zend_Pdf_Resource_ImageFactory for using external S3 Storage images in invoice
@m2-assistant
Copy link

m2-assistant bot commented Aug 26, 2022

Hi @monteshot. Thank you for your contribution
Here are some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.

For more details, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-community-project m2-community-project bot added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Aug 26, 2022
@m2-github-services m2-github-services added Partner: Perspective Studio partners-contribution Pull Request is created by Magento Partner labels Aug 26, 2022
- Changed ImageFactory from static to generic class
- Added test for ImageFactory
@monteshot monteshot marked this pull request as ready for review August 26, 2022 13:30
@monteshot
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@monteshot
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

- Added copyright and strict type setting
- Added type name for method
@monteshot
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

- Changed the modificator of access of property and its phpdoc for Image
@monteshot
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

- Changed the modificator of access of property and its phpdoc for Image
…or-issue-magento#35706

# Conflicts:
#	app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php
@monteshot
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@monteshot
Copy link
Contributor Author

@magento run WebAPI Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@monteshot
Copy link
Contributor Author

@magento run WebAPI Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Hotel
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Hotel
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Hotel
Copy link
Contributor

@magento run WebAPI Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@m2-community-project m2-community-project bot moved this from Review in Progress to Ready for Testing in Community Dashboard May 24, 2023
@engcom-Lima engcom-Lima self-assigned this May 25, 2023
@engcom-Lima engcom-Lima moved this from Ready for Testing to Testing in Progress in Community Dashboard May 25, 2023
@m2-community-project m2-community-project bot moved this from Testing in Progress to Ready for Testing in Community Dashboard May 25, 2023
@m2-community-project m2-community-project bot moved this from Ready for Testing to Testing in Progress in Community Dashboard May 25, 2023
@engcom-Lima engcom-Lima moved this from Testing in Progress to Merge in Progress in Community Dashboard May 26, 2023
@engcom-Lima engcom-Lima moved this from Merge in Progress to Testing in Progress in Community Dashboard May 26, 2023
@engcom-Lima
Copy link
Contributor

✔️ QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop and PHP 8.1

Manual testing scenario:

  • Configure remote storage (S3, minio, ...)
  • Upload an image in Stores > Configuration > Sales > Sales > Logo for PDF Print-outs (200x50)
  • Place an order and invoice it
  • Try to print invoice from backend

Before: ✖️ Getting error while clicking on Print button in backend. Pdf invoice was not getting generated.
Screenshot 2023-05-26 at 5 28 36 PM
Screenshot 2023-05-26 at 5 26 10 PM

After: ✔️ Now Pdf invoice is getting generated and can be downloaded.
Screenshot 2023-05-26 at 5 31 29 PM

Moving to Merge in progress

@engcom-Lima engcom-Lima moved this from Testing in Progress to Merge in Progress in Community Dashboard May 29, 2023
@magento-devops-reposync-svc magento-devops-reposync-svc merged commit e0e33df into magento:2.4-develop Jul 14, 2023
12 checks passed
@sidolov sidolov moved this from Merge in Progress to Recently Merged in Community Dashboard Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Partner: Perspective Studio partners-contribution Pull Request is created by Magento Partner Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept Project: Community Picked PRs upvoted by the community
Projects
Community Dashboard
Recently Merged
Development

Successfully merging this pull request may close these issues.

Remote storage issue
7 participants