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#35906 GraphQL Routes query with fragments has issue in the category page #35906 #36028

Merged

Conversation

monteshot
Copy link
Contributor

@monteshot monteshot commented Aug 25, 2022

Description (*)

  • Changed from non-safe if statement to safe "empty if ()" statement

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes GraphQL Routes query with fragments has issue in the category page #35906

Manual testing scenarios (*)

  1. Steps the same as described in comment GraphQL Routes query with fragments has issue in the category page #35906 (comment)

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)

…tegory page magento#35906

- Changed from non-safe if statement to safe empty if statement
@m2-assistant
Copy link

m2-assistant bot commented Aug 25, 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-github-services m2-github-services added Partner: Perspective Studio partners-contribution Pull Request is created by Magento Partner labels Aug 25, 2022
@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 25, 2022
@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 monteshot marked this pull request as ready for review August 25, 2022 14:49
@monteshot
Copy link
Contributor Author

@magento run Functional Tests B2B, Functional Tests EE

@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 Functional Tests B2B

@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

Hi @alena-marchenko , @chernenm. Thank you for joining the review. Is everything okay with the PR?

@sinhaparul sinhaparul added the Project: Community Picked PRs upvoted by the community label Mar 26, 2023
@engcom-November
Copy link
Contributor

Hi @monteshot
Development team is currently working on this issue.
Thank you.

@engcom-Hotel engcom-Hotel self-requested a review April 3, 2023 10:02
@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 re-request them if they don't show in a reasonable amount of time.

@engcom-Lima
Copy link
Contributor

✔️ QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop and PHP 8.1

Manual testing scenario:
Create a sub category under default category and run the graphQL query with category url in the query. Please run it in the tool

query Route($url: String!) {
    route(url: $url) {
      redirect_code
      relative_url
      type
   
      ... on CategoryTree {
        name
        id
        url_path
        url_suffix
        breadcrumbs {
          category_name
          category_url_path
          category_uid
        }
      }
       ...on SimpleProduct{
        ...ProductFragment
        }
    }
  }
fragment ProductFragment on SimpleProduct {
    name
    price_range {
      minimum_price {
        regular_price {
          value
        }
        final_price {
          value
        }
      }
    }
    description {
      html
    }
    image {
      url
    }
    media_gallery {
      url
    }
  }
  1. Variable used:
    { "url": "men.html" }

Before: ✖️ Getting error in response.

Screenshot 2023-04-05 at 11 42 13 AM

**Logs:**

Screenshot 2023-04-05 at 11 21 40 AM

After: ✔️ Now working fine
Screenshot 2023-04-05 at 11 46 43 AM

Builds are failed.Hence, moving this PR to Extended Testing

@engcom-Echo
Copy link
Contributor

@magento run Functional Tests B2B,Functional Tests EE

@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

Following errors not suitable to this PR(bugfix for GraphQL)
image
image

@monteshot
Copy link
Contributor Author

@magento run Functional Tests B2B Functional Tests EE

@magento-automated-testing
Copy link

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

@monteshot
Copy link
Contributor Author

@magento run Functional Tests EE

@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 Functional Tests B2B

@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 Functional Tests EE

@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 Functional Tests EE

@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

Another flaky test
image

@monteshot
Copy link
Contributor Author

@magento run Functional Tests EE

@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-Lima
Copy link
Contributor

engcom-Lima commented Apr 26, 2023

As discussed with internal team we are going with this PR only. Also ,builds are green. Hence,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
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 QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphQL Routes query with fragments has issue in the category page
10 participants