Skip to content

Conversation

GrassH
Copy link
Contributor

@GrassH GrassH commented Nov 2, 2023

Description (*)

Using virtual type to configure plugin, interceptor method cannot be generated correctly in setup:di:compile command

Related Pull Requests

#33981

Fixed Issues (if relevant)

  1. Fixes Using virtual type to configure plugin, interceptor method cannot be generated correctly in setup:di:compile command #33980

Manual testing scenarios (*)

  1. rm generated/* -Rf && bin/magento test:plugin:calculate
    Result is 0;
  2. rm generated/* -Rf && bin/magento setup:di:compile && bin/magento test:plugin:calculate
    Result is 0;

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)
GrassH and others added 6 commits September 3, 2021 14:37
…generated correctly in setup:di:compile command
…onfigurationBuilder.php Co-authored-by: Ihor Sviziev <ihor-sviziev@users.noreply.github.com>
…generated correctly in setup:di:compile command 1. Make changes in constructor backward compatible 2. Fix static tests - extract to separate method - replace array_merge in loop with a single array_merge
Copy link

m2-assistant bot commented Nov 2, 2023

Hi @GrassH. Thank you for your contribution!
Here are some useful tips on 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 Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@m2-community-project m2-community-project bot added Priority: P3 May be fixed according to the position in the backlog. Severity: S1 Affects critical data or functionality and forces users to employ a workaround. Progress: pending review labels Nov 2, 2023
@GrassH
Copy link
Contributor Author

GrassH commented Nov 2, 2023

@magento run all tests

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.

@GrassH GrassH changed the title Using virtual type to configure plugin, interceptor method cannot be generated correctly in setup:di:compile command magento/magento2#33980: Using virtual type to configure plugin, interceptor method cannot be generated correctly in setup:di:compile command Nov 2, 2023
@GrassH
Copy link
Contributor Author

GrassH commented Nov 3, 2023

@magento run Sample Data Tests CE,Sample Data Tests B2B,Sample Data Tests EE

Copy link

Failed to run the builds. Please try to re-run them later.

@GrassH
Copy link
Contributor Author

GrassH commented Nov 3, 2023

@magento run all tests

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.

@GrassH
Copy link
Contributor Author

GrassH commented Nov 3, 2023

@magento run Functional Tests CE, Functional Tests EE

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.

@GrassH
Copy link
Contributor Author

GrassH commented Nov 6, 2023

@magento run all tests

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.

@GrassH
Copy link
Contributor Author

GrassH commented Nov 7, 2023

@magento run all tests

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 Functional Tests B2B, Functional Tests CE, Functional Tests EE, Unit Tests

@engcom-Dash engcom-Dash self-assigned this Nov 15, 2024
@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

engcom-Dash commented Nov 18, 2024

Hello @GrassH,

Thanks for your contributions!

I tried testing the changes with this module, but when I ran the bin/magento s:d:c command, I encountered the following error:

image

However, after implementing the PR changes, I no longer got an error and got the following output instead:

image

Without the PR changes, we should be seeing result 2 (as mentioned in the issue description), but instead, we’re getting an error. Could you please take a look and let me know if it's the correct behavior or if I’m missing anything?

Thanks!

@GrassH
Copy link
Contributor Author

GrassH commented Nov 19, 2024

Hello @engcom-Dash,

Thanks for your test.

  1. The current results are consistent with our expectations.
  2. The errors encountered before applying this PR were related to the virtualType plugin in di.xml. Specifically, the issue arose because the setup:di:compile command could not locate a concrete implementation class for the virtualType. This is precisely the issue that the PR is designed to address.
  3. Once the PR was applied, the tests confirm that the fixes are working as expected.

If there are any further questions or concerns, please feel free to reach out.

@engcom-Dash
Copy link
Contributor

Hello @engcom-Dash,

Thanks for your test.

  1. The current results are consistent with our expectations.
  2. The errors encountered before applying this PR were related to the virtualType plugin in di.xml. Specifically, the issue arose because the setup:di:compile command could not locate a concrete implementation class for the virtualType. This is precisely the issue that the PR is designed to address.
  3. Once the PR was applied, the tests confirm that the fixes are working as expected.

If there are any further questions or concerns, please feel free to reach out.

Thanks @GrassH for detailed clarification.

Moving this PR to Extended Testing since the builds are failed.

Test result

@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run Static Tests, Functional Tests B2B

@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run Functional Tests EE, Functional Tests CE, Functional Tests B2B

@engcom-Dash
Copy link
Contributor

@magento run Functional Tests EE, Functional Tests CE

@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run Functional Tests EE, Functional Tests CE, Functional Tests B2B

@engcom-Dash
Copy link
Contributor

The Functional B2B, CE and EE test failures seem to be flaky. The failures also include some known issues, hence moving it to Merge in Progress.

Functional Tests B2B
Known issue: ACP2E-3458

Run 1: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38141/6dfce53f7f9e013212c4c7b915431a5c/Functional/allure-report-b2b/index.html#categories/16b25a50b4a8b68f5548cdba82ebd5f8/58a726a39d59b0fb/
image

Run 2: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38141/c27fb9e82b18744482eeab619e24e16b/Functional/allure-report-b2b/index.html#categories/3a3a8306986cbb01e5245b23e6e5b238/96c6faab3bc85b58/
image

Functional Tests CE
Known Issue: ACP2E-3481

Run 1: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38141/d00c2d375e6486354193d7c911f9bc59/Functional/allure-report-ce/index.html#categories/8fb3a91ba5aaf9de24cc8a92edc82b5d
image

Run 2: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38141/d55918e52e4d4d84781edf8a42b78965/Functional/allure-report-ce/index.html#categories/6d7e37752c3cc83cb3d2063131f608bb/956c2cc3b4616e7c/
image

Functional Tests EE
Run 1: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38141/5bef4bbac2c70291599ac151fdb140d3/Functional/allure-report-ee/index.html#categories/86f01d7568e711d70717402bfb40c229/46a9bdb7086d4e12/
image

Run 2: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38141/48c0b1299532ce054f153bb76122cd2e/Functional/allure-report-ee/index.html#categories/a644910ae0cb11e839a98baa21929b76/936b1fb30b4a8aff/
image

@magento-devops-reposync-svc magento-devops-reposync-svc merged commit afb0b4e into magento:2.4-develop Dec 4, 2024
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: P3 May be fixed according to the position in the backlog. Progress: accept Project: Community Picked PRs upvoted by the community Severity: S1 Affects critical data or functionality and forces users to employ a workaround. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
9 participants