Skip to content

Fix kernel events handling in maintenance/update mode #19420

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

Merged

Conversation

cedric-anne
Copy link
Member

@cedric-anne cedric-anne commented Apr 9, 2025

Checklist before requesting a review

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.

Description

The CheckIfUpdateNeededListener and CheckMaintenanceListener were defining the controller in the route attribute, but this does not stops the event propagation automatically. It means that subsequent listeners were still evaluated, and it may result in executing unexpected code.

To prevent this, I refactored the listeners to add some more checks to prevent redefining a controller defined by a previous listener.

@cedric-anne cedric-anne self-assigned this Apr 9, 2025
@cedric-anne cedric-anne force-pushed the 11.0/fix-maintenance-update-checks branch from 1a30158 to 7ffde1c Compare April 10, 2025 09:01
@cedric-anne cedric-anne marked this pull request as ready for review April 10, 2025 09:02
@cedric-anne cedric-anne force-pushed the 11.0/fix-maintenance-update-checks branch from 7ffde1c to 14b5eca Compare April 10, 2025 11:15
@cedric-anne
Copy link
Member Author

I figured out that the Symfony profiler bar was trigerring 404 errors on the maintenance page. After a quick investigation, I figured out that some request listerners of the Symfony framework bundle were not execued int his case, and it was causing the issue.
To be sure that Symfony listerners are correctly executed, I had to refactored a bit the code, see 2nd commit.

@cedric-anne cedric-anne force-pushed the 11.0/fix-maintenance-update-checks branch from 14b5eca to 518bc86 Compare April 10, 2025 12:42
@cedric-anne cedric-anne added this to the 11.0.0 milestone Apr 10, 2025
@trasher trasher merged commit 632fa89 into glpi-project:main Apr 14, 2025
7 checks passed
@cedric-anne cedric-anne deleted the 11.0/fix-maintenance-update-checks branch April 14, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants