Closed (fixed)
Project:
Experience Builder
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Jul 2024 at 04:43 UTC
Updated:
13 Sep 2024 at 07:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
bhuvaneshwar commentedComment #3
wim leersThanks for reporting this! But … it's a mystery to me how to reproduce this, since tests are passing and no backtrace is included.
Comment #4
bhuvaneshwar commentedSo, when I try to uninstall XB, I encounter this error or by going to the uninstall page.
Comment #5
bhuvaneshwar commentedHere is the stack trace:
Comment #6
wim leersAha! Nice catch! 👏
That's something that we should be able to add explicit test coverage for pretty easily I think? 😊
Comment #8
bhuvaneshwar commentedTest needs to be added
Comment #10
utkarsh_33 commented@wimleers I just added the tests asserting that we are able to load the page which was not happening prior to this fix.Is there something else that needs to be a part of this test?Assigning it to you for the clarifications on this.
Comment #11
wim leersLGTM!
P.S.: I ran the test-only CI job and it passed tests: https://git.drupalcode.org/project/experience_builder/-/jobs/2379770 — which means that there was indeed a test failure, which means that this MR contains the appropriate test coverage. 👍
Comment #12
wim leersI was wrong:
That CI job should've failed. The test passes locally without the code changes.
Comment #13
wim leersFound the root cause: the test assertion was inverted … which meant it always passes.
Fixed.
Comment #14
wim leersComment #15
wim leersIf you agree with my changes, then the honor is all yours to merge this MR, @Utkarsh_33! 😄
Comment #16
wim leersToo bad, the test fails on PostgreSQL for some reason 🤷♀️ See https://git.drupalcode.org/project/experience_builder/-/jobs/2380752
To debug this, add
temporarily before the failing assertion.
Comment #17
wim leersComment #19
omkar-pd commentedhttps://issue.pages.drupalcode.org/-/experience_builder-3464830/-/jobs/2...
Comment #20
wim leersOkay, so this error on PostgreSQL:
is expected.
What is not expected, is that this runs at all, because we have
in
FieldTypeUninstallValidatorTest.Conclusion: we expect that
UninstallModulePageTestwill fail on PostgreSQL too. We have #3452756: Ensure querying JSON nested values when parent keys are unknown is possible in all supported databases for this.So this needs a slight adjustment to the new
UninstallModulePageTestand then it'll be good to go 👍Comment #22
pooja_sharma commentedAs per #20 , tweak code of UninstallModulePageTest so that test skip for PostgreSQL only as it fails for this one.
Also observed there are some pipeline failures related : \ComponentValidationTest::randomMachineName() , for this rebased the MR. apart from it nothing seems to be left.
This is kernel test, so here this var $connection_info['default']['driver'] return 'mysql', so this is not run for all which is expected.
Verified if we want var $connection_info['default']['driver'] returns value in string format like 'mysql' then test need to extend from InstallerTestBase.class for functional test otherwise it return Drupal\mysql\Driver\Database\mysql
Please review, moving NR
Comment #23
wim leersGetting close!
Comment #24
pooja_sharma commentedI have tried to address feedback & rebased the MR, Please review, moving to NR
Comment #25
atul_ghate commentedHi,
I reviewed MR!143, applied it against Experience Builder 0.x, and confirmed that I can go to the uninstall page without any errors. I was also able to uninstall the module and verified that the module is working correctly.
I’ve added a before-and-after screen recording for reference. RTBC+
Thank you.
Comment #26
wim leersThe test-only CI job indeed reproduces the reported bug:
— https://git.drupalcode.org/issue/experience_builder-3464830/-/jobs/2575834
👍
Time to ship this! 🚢 Thanks all 🙏
P.S.: @atul_ghate: please do not post screenshots of a patch successfully applying. That is not remotely helpful. If the MR applies, we already know that it's an applicable patch …
Comment #28
wim leersComment #29
kristen polPerhaps a follow-up issue is needed?
Comment #30
wim leers#29: That's Drupal core's
\Drupal\field\FieldUninstallValidator, not XB.Before uninstall the XB module, you have to first delete all XB field instances. That's true for any module providing a field type.
So no, no follow-up is needed for that 😇
Comment #31
kristen polAh yes of course… brain is mush.
I have seen some modules that maybe had a friendlier error message or maybe I’m hallucinating at this point 😜
Comment #32
wim leers@kristen pol The message is much friendlier also for this scenario … if you use the UI. There's only so much that's possible in a
drushCLI context :)