Overview
The UI application may want to persistently log errors, warning, notices etc.
Proposed resolution
Implement a route that provides an API endpoint for the UI application to create log entries. The Experience Builder module already defines @logger.channel.experience_builder, which could be used by the route's controller.
#3467844: [PP-1] Log client-side errors will make use of this endpoint in the UI codebase.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | Screenshot from 2024-08-23 18-07-11.png | 130.14 KB | pooja_sharma |
Issue fork experience_builder-3467843
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
balintbrewsComment #3
wim leers#3461431: Improve client side error handling is in — the next step is #3467844: [PP-1] Log client-side errors, which this is a blocker for.
Comment #6
omkar-pd commentedComment #7
wim leersThanks, @omkar-pd, looking good! This still needs a functional test 😊
Comment #8
omkar-pd commentedCreated my first tests.😃 Probably will need some changes.
Comment #9
pooja_sharma commentedComment #10
pooja_sharma commentedAddressed test coverage issue , test passed on local & attached the screenshot as well however left there one comment on MR for test coverage need suggestion here , fixed undefined variable errors for newly added route, rebased the MR & resolved conflicts.
Please review, moving NR
Comment #11
pooja_sharma commentedComment #12
pooja_sharma commentedComment #13
wim leers#8: Congrats! 😄
This is 99% ready! 👏 The test looks great 😊 — impressive for your very first test! (And thanks @pooja_sharma for putting those nice finishing touches on it!)
Comment #14
pooja_sharma commentedThanks @wim-leers for recognizing efforts happy to contribute , got your concerns regarding test coverage feedback after removing standard profile code, test resource usage goes from Time:
00:16.673, Memory: 4.00 MB to Time:00:05.687, Memory: 4.00 MB which eliminates the half of test execution time (much faster).I m here for contributing for test coverage as per request @omkar-pd, also has done great, as it's his first test coverage even fix
the issue that's not replicate on local & found its alternate solution & initially much of the work done by him so letting him to take opportunity to cover up pending feedback.
Comment #15
omkar-pd commentedThank you @wim-leers and @pooja_sharma.
I've addressed the feedback given. Moving this to NR.
Comment #16
omkar-pd commentedBump
Comment #17
lauriiiAssigning to @Wim Leers for review
Comment #18
wim leersThis should wait for #3466555: Also validate request bodies against the OpenAPI spec to land — it makes
openapi.ymlmore maintainable.(I expect to land in the next hour or so though 👍)
Comment #19
wim leersComment #20
wim leers#3466555: Also validate request bodies against the OpenAPI spec is in, rebasing…
Comment #21
wim leersLGTM!
But since I requested @traviscarden to become the
CODEOWNERfor/openapi.ymlat #3466555-21: Also validate request bodies against the OpenAPI spec.3, I'd like him to do the final review 😊Comment #22
traviscarden commentedNice contribution! I've requested some changes on the MR.
Comment #23
omkar-pd commented@wim-leers, @traviscarden
Need suggestions for this.
https://git.drupalcode.org/project/experience_builder/-/merge_requests/1...
Comment #24
wim leersWill review/merge in upstream to get this back on track 😊
Comment #25
wim leersTo answer #23:
shows that there's a bug in the controller logic:
👆 That doesn't verify the log level is valid, only that one is specified.
Comment #26
omkar-pd commentedComment #27
wim leers@larowlan's https://git.drupalcode.org/project/experience_builder/-/merge_requests/1... still needs to be addressed.
Almost there! 😄
Comment #29
wim leersStill needs the tests that @larowlan suggested.
Comment #30
omkar-pd commentedComment #31
wim leersComment #32
wim leersFinal review pass, fixed my own nits. Looked great!
I actually don't quite like that this is now a unit test instead of a functional test. Because it doesn't prove the route actually works, only that the controller works.
But … #3467844: [PP-1] Log client-side errors will have to add an end-to-end test, and that's even better.
So: RTBC! This now only needs MR approval from @traviscarden, so assigning to him.
Comment #33
traviscarden commentedNice! I prettified
openapi.ymland approved it.Comment #35
wim leersYay! Merged and unpostponing #3467844: [PP-1] Log client-side errors 👍
Comment #36
omkar-pd commented🎉🎉