Skip to content
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

Efflux: Avoid generating error logs by installer.pl #583

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

eyazi
Copy link
Contributor

@eyazi eyazi commented Jul 25, 2024

Proposed change

The installer.pl generates numerous error messages during the installation of Znuny – even if everything works fine. This PR tries to eliminate some/most of them.

Type of change

  • '1 - 🐞 bug 🐞' - Bugfix (non-breaking change which fixes an issue)

Additional information

Kernel/Modules/Installer.pm: PrintError makes sure failed database calls don't get handled by Perl (→ the web server). Every major error will either get directly shown to the user via $DBI::errstr or there is an existing translation message attached to it. Just by checking that the database is empty (by checking if the valid table exists), an error message gets created. Most of the other checks will also get logged as errors.

Kernel/System/Package.pm: var/packages will most likely not exist on > 95% of the installed systems. The subroutine does currently not check if the directory exists and throws an error.

Kernel/Output/HTML/Layout.pm: Both subroutines that got wrapped into the InstallerOnly check, make direct calls to the database, which does not exist yet (or at least shouldn't). InstallerOnly doesn't get used anywhere else, but it feels like this is a perfect use for it.

I don't think internal checks should write error messages to the log. This might give the wrong (first) impression that something went wrong or could have been done better.

Checklist

  • The code change is tested and works locally.(❗)
  • There is no commented out code in this PR.(❕)
  • You improved or added new unit tests.(❕)
  • Local ZnunyCodePolicy passed.(❕)
  • Local UnitTests / Selenium passed.(❕)
  • GitHub workflow CI (UnitTests / Selenium) passed.(❗)

@eyazi eyazi changed the title Efflux: Avoid generating errors in installer.pl Efflux: Avoid generating error logs by installer.pl Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant