-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Improve error messaging when merged XML is invalid #36239
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
Improve error messaging when merged XML is invalid #36239
Conversation
Hi @fredden. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
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. 🕙 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 |
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. |
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. |
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. |
@fredden Great job! Do you feel it's possible to cover with any type of automated tests? |
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
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. |
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. |
I don't know how to reliably cover this with a test. We could write a test using the given example, but the underlying problem is being fixed in #36240, so we'd need another test case that will reliably break. I'm open to suggestions. |
Yeah, looks like it will be too hard to cover it with test, let's skip it |
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 run Functional Tests EE |
@engcom-Delta thanks for testing. I can see that you have successfully verified the change. What changes would you like to be made to this pull request? Perhaps you meant to confirm/approve this and picked the wrong option? |
@fredden My apologies for that. I have updated and will move it to the appropriate column. |
@magento run Functional Tests B2B |
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 run Functional Tests EE |
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. |
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 run Functional Tests CE |
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 run Functional Tests CE, Functional Tests B2B |
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. |
1 similar comment
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 run Functional Tests B2B |
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. |
1 similar comment
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 run Functional Tests B2B |
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. |
Description
When dealing with XML in Magento, the error messages are not always most helpful. When each XML document is individually valid, but the result of merging these isn't, the error message does not help a developer identify the issue.
This pull request adds the filename causing a problem to the error message output.
Before and after pictures
The following two pictures show the output from
bin/magento setup:upgrade
where the problem shows up.Before:
After:
Manual testing scenarios
Note that if you fix/merge #36240 before this, then you will need to find alternative steps to reproduce.
bin/magento deploy:mode:set developer
app/code/
etc/db_schema.xml
file changing the 'type' of an existing column from 'int' (with 'padding') to 'varchar'. For example,magento2/app/code/Magento/AsynchronousOperations/etc/db_schema.xml
Lines 20 to 21 in 447c613
bin/magento setup:upgrade
Before this change, it is very difficult to identify the location of the error.
Questions or comments
All unit tests pass both before and after this change, suggesting that the code coverage isn't ideal. Perhaps we need a separate task to improve code coverage of this class.
Contribution checklist (*)