Closed (fixed)
Project:
Drupal core
Version:
9.4.x-dev
Component:
hal.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Feb 2022 at 13:52 UTC
Updated:
2 Jun 2022 at 04:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
bbralaThat failure is expected since it checks for coverage and the tests have now moved. Will fix later.
Comment #4
bbralaAll the scoped tests are moved. These are a few tests left that have some test methods that test hal, or parts of the test methods test HAL. So this part will require a bit more attention :)
Comment #6
bbralaThere is a few challenges left. There is quite a few places where the rest module uses hal to test functionality, I'm not entirely sure how to handle that. The same goes for some other places where I'm not sure what the best way is to handle the test changes.
Comment #7
spokjeNow that's annoying, locally the test passes when ran as a single test:
Comment #8
spokjeComment #9
spokjeComment #10
bbralaHmm, i tried moving the rest export part of
comment_test_viewstest module. But i cant get it to work with only the rest view in the hal module. Kinda annoying but perhaps you could have a look spokje?(asked this in slack)
Also attached the current search results for hal and hal_json.
Search for 'hal'

Search for hal_json

Comment #11
spokjeComment #12
spokjeI think we're there. All HAL related tests should now be in the hal namespace and /core/modules/hal/tests directory.
Comment #13
bbralaYou rock spokje:)
Comment #14
spokjeTo make sure we indeed moved everything:
D10.0.x-devcore/modules/haldrupal-9.3.0.filled.standard.php.gzfixture to _not_ have the HAL module installedThen ran it through TestBot here: https://www.drupal.org/project/drupal/issues/3191612#comment-14408424, that came back green, so I think we indeed caught them all.
Comment #15
larowlanAmazing work
Comment #16
kristen polThanks for the updates. I've updated the title and issue summary with typo fixes and minor wording and formatting changes.
Comment #17
spokjeThanks @daffie for the review, all threads resolved.
Comment #19
bbralaAdding Daffie to credit for his (partial?) review.
Comment #20
daffie commentedAre we sure that we want to do this? The config is be used in core/modules/layout_builder/tests/src/Functional/Rest/OverrideSectionsTest.php. Also we are linking
core/core.api.phpto this to be removed from core config.Comment #21
spokjeThus spoketh @daffie in #20
The rationale here is that even when moved as-is to Contrib, HAL needs to work out-of-the-box.. Which means there should be (as before) a working example of a REST endpoint config file. Hence the moving-to-HAL of this config YAML.
The mention in
core/core.api.phpis altered from a currently already non-existing path to the one in this change.In the actual removal in D10.0.0 issue for HAL #3049857: Remove HAL module from core and create a contrib project for it we restore the REST endpoint config in
/core/modules/rest/config/optional/rest.resource.entity.node.ymlbut as json instead of hal_json. (As mentioned in the @todo incore/modules/system/tests/src/Functional/System/ResponseGeneratorTest.php). Also we changecore/core.api.phponce more to link to the config in the REST module.(And thanks for reviewing these MegaMR)
Comment #22
daffie commentedI get why the config item has been moved.
All changes look good to me.
All my points are resolved.
For me it is RTBC.
Comment #23
longwaveRead through the whole patch, the changes almost all look good to me. Added a couple of minor questions but nothing that should block the RTBC.
Comment #24
spokjeTo make sure we've met "gotta catch them all" for the moved test, I've applied the changes in this MR to the latest
10.0.x-dev, applied the changes from #3049857: Remove HAL module from core and create a contrib project for it on top of it (which is in essence some small changes, a changed 9.3-filled fixture which hashalmodule _not_ installed, and deletion of thecore/modules/haldirectory) here: https://www.drupal.org/project/drupal/issues/3191612#comment-14411302FWIW: That just came back green.
I've looked at the remarks made by @longwave (tips hat for doing the review), they make sense (per usual) but are indeed more nice to haves IMHO.
I'll try to tackle them later today, if $dayjob allows it. (I'm pretty sure by then this issue won't be committed yet.)
Comment #25
spokjeHang on, didn't want a status change...
Comment #26
spokjeThanks @daffie for the review and suggestions. I've tried to incorporate them all.
TestBot returned green, also the "Gotta catch em all" test (Apply the changes in this MR on top of
10.0.x-dev, apply the changes of the removal MR #3049857: Remove HAL module from core and create a contrib project for it on top of that, delete the wholecore/modules/hal) came back green here: https://www.drupal.org/project/drupal/issues/3191612#comment-14412677Since code changed I think another round of review is needed => Back to NR
All open threads are (in my mind at least) resolved, but since I didn't create the MR I can't actually resolve them. @bbrala will come along at some point and do so.
Comment #27
daffie commentedAll code changes look good to me.
All threads on the MR are addressed.
For me it is RTBC.
Comment #28
catchOK this is a huge diff but it's only really doing a couple of things:
1. 1-1 moves for Hal tests
2. Stops using HAL as a random format in a couple of tests, switching to something else.
3. Duplicating/splitting some generic REST tests that cover both json and hal into hal module to only test hal.
All of this seems fine. However, the MR diff only applies to 9.4.x, and I think (?) this should go into 10.0.x first and be backported (then contrib hal can be a subtree split following this change), so we need a separate 10.x patch/MR to commit there first.
Comment #29
spokjeThanks @catch for speaking words of wisdom (let it be, let it be, let it be-e, let it be...), aiming for 10.0.x first is indeed inline with the normal proceedings now 10.0.0-alpha-something is out, I'll create a new MR for that.
Comment #31
spokje9.4.x-dev10.0.x-devComment #34
spokjeAnother victim of #3265356: Deprecate Symfony 4 RequestStack BC shim for removal in D11, postponing on that issue.
Comment #35
spokjeComment #36
spokjeUnpostponing after #3265356: Deprecate Symfony 4 RequestStack BC shim for removal in D11 landed.
Comment #37
catchGive this is just a re-roll since the last RTBC, moving it back there.
Comment #38
spokjeEven the tiny help_topic snippet for the hal module should probably also be moved.
Also attached a raw diff between both MRs.
Comment #39
daffie commentedBack to RTBC
Comment #41
catchCommitted/pushed the respective patches to 10.0.x and 9.4.x respectively, thanks!
Comment #42
spokje@catch Looks like the 9.4.x part of the above sentence never made it into Git, forgotten push perhaps?
Comment #46
tr commentedAt least one of the tests in this issue should not have been removed from core. See #3268078: DBLogResource is no longer being tested
Comment #47
catchOpened an issue for this one too:
#3268105: Bring back RestRegisterUserTest into user module (without HAL)
Comment #48
kristen polTagging for posterity.