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

Internal server error on Category graphQl query for redirect code field #36693

Merged

Conversation

Vasudev-22
Copy link
Contributor

@Vasudev-22 Vasudev-22 commented Jan 2, 2023

Description (*)

  1. redirect_code filed will not accept as null ,because in graphQl the field was set a mandatory with integer value.
  2. If redirect_code is null in category graphQl, then it will return as Zero.
    redirect_code Int!
    Contains 0 when there is no redirect error. A value of 301 indicates the URL of the requested resource has been changed permanently, while a value of 302 indicates a temporary redirect.

Related Pull Requests

Fixes for #36675

Fixed Issues (if relevant)

  1. Fixes Internal server error on Category graphql query #36675

Manual testing scenarios (*)

category_graphql

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)

@m2-assistant
Copy link

m2-assistant bot commented Jan 2, 2023

Hi @Vasudev-22. 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

@Vasudev-22
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.

@m2-community-project m2-community-project bot added the Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. label Jan 3, 2023
@swnsma swnsma self-requested a review January 8, 2023 10:30
@swnsma
Copy link
Contributor

swnsma commented Jan 8, 2023

@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.

@swnsma
Copy link
Contributor

swnsma commented Jan 8, 2023

@magento run Functional Tests CE, Functional Tests EE, 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.

@swnsma swnsma self-assigned this Jan 8, 2023
@m2-community-project m2-community-project bot moved this from Pending Review to Review in Progress in Pull Requests Dashboard Jan 8, 2023
Copy link
Contributor

@swnsma swnsma left a comment

Choose a reason for hiding this comment

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

Hi @Vasudev-22,

Thank you for your contribution!
Please check my suggestion.

According to definition of done, changes should be covered by auto-tests.
I may suggest changes in \Magento\GraphQl\CatalogUrlRewrite\RouteTest.

@m2-community-project m2-community-project bot moved this from Review in Progress to Changes Requested in Pull Requests Dashboard Jan 8, 2023
Vasudev-22 and others added 2 commits January 9, 2023 11:43
…ovider/ExtractDataFromCategoryTree.php

Co-authored-by: Oleksandr Kravchuk <swnsma@gmail.com>
@Vasudev-22
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.

@Vasudev-22 Vasudev-22 requested a review from swnsma January 9, 2023 13:00
@swnsma
Copy link
Contributor

swnsma commented Jan 9, 2023

Hi @Vasudev-22,

Thank you for your changes!

According to definition of done, changes should be covered by auto-tests.
I may suggest changes in \Magento\GraphQl\CatalogUrlRewrite\RouteTest.

@swnsma swnsma added the Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests label Jan 13, 2023
@engcom-Delta engcom-Delta self-assigned this Jan 25, 2023
@engcom-Delta
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.

2 similar comments
@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.

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

engcom-Delta commented Jan 25, 2023

@Vasudev-22 @swnsma

Thank you for your contribution!

The functional test failures in B2B and CE are different from the last two run.
B2B : run1
Screenshot 2023-01-25 at 8 54 16 PM
run2
Screenshot 2023-01-25 at 5 47 28 PM

CE : run1
Screenshot 2023-01-25 at 9 20 21 PM

run2
Screenshot 2023-01-25 at 9 14 41 PM

Hence, moving this PR to Ready for Testing

Thanks.

@engcom-Delta engcom-Delta moved this from Changes Requested to Ready for Testing in Pull Requests Dashboard Jan 25, 2023
@engcom-Lima engcom-Lima self-assigned this Jan 27, 2023
@engcom-Lima
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests CE

@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 engcom-Lima moved this from Ready for Testing to Testing in Progress in Pull Requests Dashboard Jan 27, 2023
@engcom-Lima
Copy link
Contributor

@magento run Functional Tests CE

@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 with Sample data.

Manual testing scenario:
-> Run below graphQL query and check the response:

{
	categories(filters: {}, pageSize: 1, currentPage: 2) {
		total_count
		items {
			available_sort_by
			uid
			level
			name
			path
			children_count
			canonical_url
			children_count
			custom_layout_update_file
			default_sort_by
			description
			display_mode
			filter_price_range
			image
			include_in_menu
			is_anchor
			landing_page
			level
			meta_description
			meta_keywords
			meta_title
			name
			path
			path_in_store
			position
			product_count
			redirect_code
			relative_url
			type
			uid
			url_key
			url_path
			url_suffix
			children {
				uid
				level
				name
				path
				children_count
				children {
					uid
					level
					name
					path
				}
			}
		}
		page_info {
			current_page
			page_size
			total_pages
		}
	}
}

Before: ✖️ Getting internal server error in the response.
Screenshot 2023-01-27 at 12 23 10 PM

After: ✔️ Now it is working fine.
Screenshot 2023-01-27 at 12 40 37 PM

Additionally tested:

  • Tested without sample data.
  • Removed products and verified the error coming or not in the response.
  • Removed category and verified the error coming or not in the response.

No need of additional test cases is required as part of regression.

As per above comment failed testcases not related to the PR. Hence, moving this PR to Merge in progress.

@engcom-Lima engcom-Lima moved this from Testing in Progress to Merge in Progress in Pull Requests Dashboard Jan 27, 2023
@engcom-Charlie engcom-Charlie self-assigned this Jan 31, 2023
@m2-community-project m2-community-project bot moved this from Merge in Progress to Ready for Testing in Pull Requests Dashboard Jan 31, 2023
@engcom-Charlie
Copy link
Contributor

It seems bot moved this PR from Merge in Progress to Ready for Testing hence moving it back.

@engcom-Charlie engcom-Charlie moved this from Ready for Testing to Merge in Progress in Pull Requests Dashboard Jan 31, 2023
@magento-devops-reposync-svc magento-devops-reposync-svc merged commit a928c4e into magento:2.4-develop Feb 14, 2023
@engcom-Charlie engcom-Charlie moved this from Merge in Progress to Recently Merged in Pull Requests Dashboard Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: accept
Projects
Pull Requests Dashboard
  
Recently Merged
Development

Successfully merging this pull request may close these issues.

Internal server error on Category graphql query
6 participants