Closed (fixed)
Project:
Experience Builder
Version:
0.x-dev
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
9 Dec 2024 at 19:20 UTC
Updated:
18 Jul 2025 at 09:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tedbowComment #3
tedbowComment #5
tedbow@longwave pointed out that #3416522: Add the ability to install multiple modules and only do a single container rebuild to ModuleInstaller was only added to 11.x. The current just switches our phpunit (next major) to use 11.1.x. Assuming this passes test I suggest we commit this and leave the issue to remove the need for the override
Comment #6
tedbowAssigning to @wim leers because he needs to .gitlab-ci.yml changes
Comment #7
longwave#3480805: CI: update to >=1.6.3 of the GitLab CI Template also pins to 11.1.x, maybe worth doing that instead as Stylelint is also failing but upgrading the template will eventually unblock that via #3492697: Update Stylelint formatter for Stylelint 16
Comment #8
longwaveI can reproduce the fail locally with
Comment #9
catchAt a guess, this might be why:
Might be worth trying with #3492705: Install modules with container_rebuild_true set by themselves applied.
Comment #10
longwave#3492705: Install modules with container_rebuild_true set by themselves indeed does fix it.
Comment #11
catchWhy is the writing component info to state done as a decorator? Could this not be a separate service that operates on e.g. hook_rebuild()? Would mean no need for the recursion protection then.
Comment #12
longwave#3492705: Install modules with container_rebuild_true set by themselves landed so this should no longer be necessary - @tedbow can you confirm?
We should still do #3480805: CI: update to >=1.6.3 of the GitLab CI Template.
Comment #13
tedbowre #12
re-running tests on 0.x. https://git.drupalcode.org/project/experience_builder/-/pipelines/364038
there is e2e test that also appears to be failing but that is unrelated. see #3492734: Empty-canvas e2e test is failing randomly and has leftover wait() call that shouldn't be there
Comment #14
tedbowLooks like it is failing for different reason https://git.drupalcode.org/project/experience_builder/-/pipelines/364038
I triggered the jobs to re-run on the same pipeline so I am not sure we can see the previous results
Seeing if I can re-run the pipeline here with a new commit
Comment #15
tedbowYep still failing
Comment #16
wim leersSpotted this too yesterday, thanks for jumping in! 👍🙏
Comment #17
tedbowIf 11.1.x passes I would suggest we use that and then leave this issue as critical. Only so many people can probably work on figuring this out and meanwhile it would good if other issues could get committed. Also maybe 11.x will be receiving a lot of commits while Drupalcon Singapore is going on?
Comment #18
wim leers+1
Comment #19
longwaveI think we should do #3480805: CI: update to >=1.6.3 of the GitLab CI Template which will test against 11.1 and 10.4 and is currently green, then we can enable OPT_IN_TEST_NEXT_MINOR to add 11.2 but that's not critical to complete until closer to the release of 11.2.0.
Comment #20
wim leersOh, even better! Looking 👀
(The "+1" was referring to "let's unblock this ASAP".)
Comment #21
wim leersJust reviewed #3480805 in depth, and pleased to say I was able to RTBC it! 🚀 Yay for one temporary work-around avoided, and the correct/long-term solution being ready at the same time! 🥳
Comment #22
wim leers#3480805: CI: update to >=1.6.3 of the GitLab CI Template is in — is there anything left to do here? 😊
Comment #23
longwaveWell, we should now opt in to "next minor" in our CI config and then fix the failure.
Comment #24
wim leers👍 — retitling.
Comment #27
longwaveComment #28
longwaveComment #29
wim leersNice, that seems to be uncovering either not previously observed bugs or
11.2.xhas changed in some way — because tests are failing withunmet config dependencies! 😬Also:
… this seems an upstream bug in core?
Comment #30
wim leersThis is less urgent than many other MRs, so unassigning @longwave.
Comment #31
wim leersThanks to @longwave, closed #3497866: CI: also test against next minor: 11.2.x aka Drupal 11.x HEAD as a duplicate.
Comment #32
longwave@penyaskito found that FieldTypeUninstallValidatorTest fails in HEAD as well
probably due to #3416522: Add the ability to install multiple modules and only do a single container rebuild to ModuleInstaller
Comment #33
penyaskitoDisclaimer: I usually work with 11.x HEAD, so was surprised I didn't see this before.
The problem is that if installing several modules, after experience_builder is installed no rebuild is happening, so it's not triggering the discovery of sdc components/blocks and its related config creation, and
xb_test_config_node_articledepends on that.I thought we might need to flush caches on
hook_install, but we are actually doing that already.That's why the issue only happens in (some) kernel tests.
So we have two options:
1) Include the config in
xb_test_config_node_article(meh 😔)2) Document and workaround it in kernel tests (☺️)
e.g Never use
but instead use
Comment #34
catchcontainer_rebuild_required = TRUEin xb.info.yml might be enough. See #3492235: Default container_rebuild_required to FALSE.Comment #35
penyaskitoEven better, thanks!
Comment #36
longwave#32 onwards is a core bug in the module installer since #3416522: Add the ability to install multiple modules and only do a single container rebuild to ModuleInstaller that means that modules that depend on XB components cannot be installed at the same time that XB itself is installed. This is because XB creates config objects on the fly, that do not exist until after XB is actually installed, but
::install()does this (simplified):Because we check the config dependencies of the entire set before anything is installed, the XB config entities can never exist by this point.
Locally, moving
checkConfigurationToInstall()into the later loop makes the tests pass for me, so I will open a core issue to change this.Comment #37
wim leersWow, #36 is quite the find! 🤯 Thanks, @longwave!
Comment #38
longwaveWrote all this up and was about to open a new issue, then found that I opened #3497173: Modules that create config cannot be installed alongside modules that depend on that config back in January and completely forgot about it!
Alternatively though: XB can ship
experience_builder.component.sdc.experience_builder.*as default config to work around this, at least for the XB-provided set of components - given this will be created at install time anyway, why can't we ship with it?Comment #39
penyaskitoI had the same question as #36 at #33, and catch responded in #34.
Comment #40
wim leersCan't really argue with that.
Won't that be a pain to maintain though? 🤔Thanks to
\Drupal\Tests\experience_builder\Functional\DefaultConfigTestit should be no pain at all; our tests would tell us. Or they should. If not, then we would need an explicit test for that.Comment #41
wim leersPer #39, did we try @catch's #34?
Meanwhile: testing #40's assumptions.
Comment #42
longwaveYes I tried #34, it doesn't help because
container_rebuild_requiredis not considered until aftercheckConfigurationToInstall()is called, which is where the error is triggered - see the pseudocode in #36.Comment #43
longwaveNot sure 30291899 is a valid test because
SingleDirectoryComponent::updateConfigEntity()only updatesprop_field_definitions, not labels - if we don't have a child of #3520484: [META] Production-ready ComponentSource plugins to deal with this we need one.Comment #44
longwaveAll green! Unsure if we want to make next minor fail CI or if we should just keep an eye on it manually; the problem is that next minor is a moving target so what passes today may not pass tomorrow and not be the fault of anything we have done, which might slow our progress.
Comment #45
longwaveComment #46
wim leers#43++, tagging.
Comment #47
wim leers#44: how about we mark this CI job to allow failures? Then we can at least see where we're at. Manually triggered on MRs, automatically on commit?
Comment #48
longwavePHPUnit (next minor) already allows failures. Pushed a change to disable
_FOR_EVERY_MR_COMMITfor the next minor matrix so we can run them manually.Opened #3522164: Handle update and delete of SingleDirectoryComponent `Component`s, plus missing config dependencies as a sister issue of #3484682: Handle update and delete of Block `Component`s, plus react to dependency removal.
Comment #49
wim leersI wanted to merge this, but:
We want only 1 of the 4 for the next minor, too.
Comment #50
wim leersMarked #3523759: [PP-1] Cypress tests include invalid menu config on 11.x HEAD as a duplicate of this. See how the default menu block plugin configuration changed. We'll need to port that change here most likely.
Comment #51
wim leersComment #52
wim leershttps://www.drupal.org/project/drupal/releases/11.2.0 was created ~7 hours ago while I was sleeping :)
So: soon "next minor" will become "current minor", at which point our CI will break unless we force CI back to considering
11.1current minor.Comment #56
wim leersDiscussed with @effulgentsia and @lauriii. We agreed that XB
1.0.0-beta1should require 11.2, meaning we'll drop 11.1 support.That will simplify things that may be different between different minors, such as #3493070: SDC `enum` props should have translatable labels: use `meta:enum`.
It will also simplify getting to a green PHPStan — because in the past we've had different minors' PHPStan rules conflict, requiring awkward exotic dances 🕺 😅
Comment #57
wim leersPaired with @isholgueras to accelerate getting this on track, per #56.
Turns out that @longwave's #38 aka #3497173: Modules that create config cannot be installed alongside modules that depend on that config is no longer occurring, because @isholgueras and I removed all the
config/install/experience_builder.component.*.ymlfiles and tests pass 🥳PHPUnit CI job failure is caused by a PHP warning:
AFAICT that's the only thing that still needs to be resolved? 🤞
Comment #58
wim leersInvestigating #57.
Comment #59
wim leersFigured out #57.
ComponentSourceBase::normalizeSlotDefinitions()assumes every slot has a title. And that's actually pretty reasonable to expect. Because it's equally crucial for usability as props having titles. So: made that a proper requirement now 👍but also … LOL, I was wildly wrong in #57 😇 The "next minor" CI job wasn't running at all; I was looking at the current PHPUnit CI job … 🫣
It crashes very early on:
Just tweaked our GitLab CI to only ever test against 11.2. That provides a clearer target: all the CI jobs we're used to looking at must pass 👍
Comment #60
larowlan.
Comment #62
larowlan.
Comment #63
wim leersCrediting @penyaskito for https://git.drupalcode.org/project/experience_builder/-/merge_requests/4...
Comment #64
larowlanWe're green and have PHPUnit running around the 5 min mark.
https://git.drupalcode.org/project/experience_builder/-/jobs/5771862
Comment #67
larowlan4 mins 11 https://git.drupalcode.org/project/experience_builder/-/jobs/5771963 😎
Comment #68
wim leers🥳🥳🥳
What a lovely bit of news to wake up to! 😊
First dropping Jack off at daycare, then can’t wait to review and land this one 🤓
Comment #69
wim leersAwesome work here, thanks everyone! 🙏
Did a complete review to make sure I 100% understand what this MR is changing and why.
Observations (for future reference for everyone, including myself):
meta:enumandx-translation-contextwill be added in #3516602: SDC `enum` props should have human-readable labels: use `meta:enum`.defaultmay be added in the distant future, in #3514672: [Needs design] DX & authoring experience: support `default` in addition to `examples[0]`, enables updating a component input across all existing instances.ui/node_modules🤪) is suddenly necessary whereas it been necessary during Drupal 10, 11.0 nor 11.1 🤷♂️ Likely culprit: #3249443: drupal_phpunit_find_extension_directories() uses infinite recursion ⇒ more directories = slower tests, which ironically I opened and did a lot of work on 3.5 years ago 🤣tests/src/TestSite/XBTestSetup.phpwill be removed in #3531679: Decouple kernel tests from `CanvasTestSetup`: painful to work on, and VERY slow 👍Comment #71
wim leersSee y'all on all other s in the next week 😊