Skip to content

fix undefined method isAllowedForRuleCondition #30479

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

Open
wants to merge 8 commits into
base: 2.4-develop
Choose a base branch
from

Conversation

yaroslav-zenin
Copy link
Contributor

Description (*)

sometimes in method \Magento\SalesRule\Model\Rule\Condition\Product::loadAttributeOptions we got
\Magento\Catalog\Model\ResourceModel\Eav\Attribute model instead of \Magento\Catalog\Model\ResourceModel\Eav\Attribute. This is not a permanent issue just happen sometimes and very difficult to reproduce.
This pull request just change condition order but this is enough to check if method present in resource model, so regular model will be skipped.

Related Pull Requests

Fixed Issues (if relevant)

could be relevant to #12176

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

  1. ...
  2. ...

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)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Oct 13, 2020

Hi @yaroslav-zenin. Thank you for your contribution
Here is 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

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, 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, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

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

@sidolov sidolov added Priority: P3 May be fixed according to the position in the backlog. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Oct 13, 2020
@lenaorobei lenaorobei assigned lenaorobei and unassigned lenaorobei Oct 13, 2020
Copy link
Contributor

@rogyar rogyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @yaroslav-zenin. Thank you for your collaboration. I believe there might be some cases when AbstractEntity gets non-catalog EAV attributes. So this change makes sense. Could I ask you to cover this case with a simple unit test? You may extend the existing test for this purpose.

@rogyar rogyar self-assigned this Oct 17, 2020
@rogyar rogyar added the Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests label Oct 17, 2020
@engcom-Charlie engcom-Charlie self-assigned this Oct 23, 2020
@engcom-Charlie
Copy link
Contributor

Hi @yaroslav-zenin. Could you please cover your changes with a unit test?
Thank you.

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

@yaroslav-zenin I will take care of test coverage.

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@rogyar rogyar added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests and removed Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests Progress: ready for testing labels Oct 30, 2020
@magento-engcom-team
Copy link
Contributor

Hi @rogyar, thank you for the review.
ENGCOM-8411 has been created to process this Pull Request

@engcom-Bravo
Copy link
Contributor

QA not applicable. Moving this PR to the Extended Testing column

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

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

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

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

@engcom-Charlie
Copy link
Contributor

One of the Functional B2B failure in recent 2 build is not consistent, seems to be flaky and the rest 3 are known issues.

Run 1:
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/30479/15e6b854ad49ebe1790846d91ac373b6/Functional/allure-report-b2b/index.html

image

Run 2:
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/30479/ce08d2da6fe90fab4fdba46f6b2470fe/Functional/allure-report-b2b/index.html
image

Known Issues:

  1. TierPricingWhenPriceScopeIsWebsiteWorkingProperlyWithMultipleCurrenciesConfiguredTest: #ACQE-6695
  2. AdminReorderWithCatalogPriceRuleDiscountTest: #ACQE-6523
  3. StorefrontUpdateCustomerAddressBelgiumTest: #ACQE-6648

@engcom-Charlie
Copy link
Contributor

engcom-Charlie commented Jun 19, 2024

@engcom-Charlie
Copy link
Contributor

One of the Functional EE failure in recent 2 build is not consistent, seems to be flaky and the rest 3 are known issues.

Run 1:
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/30479/ef0927a6ead496964bb6a8e0c89b3831/Functional/allure-report-ee/index.html#categories

image

Run 2:
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/30479/4a62594e7d401e1c2bf789712cae9a47/Functional/allure-report-ee/index.html#categories
image

Known Issues:

  1. TierPricingWhenPriceScopeIsWebsiteWorkingProperlyWithMultipleCurrenciesConfiguredTest: #ACQE-6695
  2. AdminReorderWithCatalogPriceRuleDiscountTest: #ACQE-6523
  3. StorefrontCreateOrderAllQuantityGroupedProductOptionDefaultStockTest: #ACQE-6331

@engcom-Charlie
Copy link
Contributor

engcom-Charlie commented Jun 19, 2024

As mentioned above Functional B2B, Functional CE and Functional EE tests are not failing because of this PR changes, moving this PR to Merge in Progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: SalesRule Priority: P3 May be fixed according to the position in the backlog. Progress: accept Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
Status: Merge in Progress
Development

Successfully merging this pull request may close these issues.

7 participants