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

Enhance error message in Admin::Package::UpgradeAll console command #2653

Closed
bschmalhofer opened this issue Nov 8, 2023 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

I just updated a development version of OTOBO 11.0.x running under Docker: I used the script scripts/update.sh for that. In var/log/update.log I got a lot of messages like:

6927 Message: No packages for your framework version found in this repository, it only contains packages for other framework versions.
6928
6929 Traceback (30):
6930 Module: Kernel::System::Package::PackageOnlineList Line: 1556
6931 Module: Kernel::System::Console::Command::Admin::Package::UpgradeAll::Run Line: 113
6932 Module: (eval) Line: 480
6933 Module: Kernel::System::Console::BaseCommand::Execute Line: 474
6934 Module: Kernel::System::Console::InterfaceConsole::Run Line: 88
6935 Module: /opt/otobo/bin/otobo.Console.pl Line: 35

This would be less confusion if the framework version would be included in the message.

The relevant code is in Kernel/System/Package.pm :

    if ( @Packages && !$PackageForRequestedFramework ) {
        $Kernel::OM->Get('Kernel::System::Log')->Log(
            Priority => 'error',
            Message  =>
                Translatable(
                    'No packages for your framework version found in this repository, it only contains packages for other framework versions.'
                ),
        );
    }

The Message can be easily adapted. IMHO the empty command Translatable() is not useful there too. AFAIK, log messages are never translated.

@bschmalhofer bschmalhofer added the enhancement New feature or request label Nov 8, 2023
@bschmalhofer bschmalhofer added this to the OTOBO 11.0 milestone Nov 8, 2023
@bschmalhofer bschmalhofer self-assigned this Nov 8, 2023
bschmalhofer added a commit that referenced this issue Nov 8, 2023
bschmalhofer added a commit that referenced this issue Nov 8, 2023
No need for Translate(), as log messages are not translated.
bschmalhofer added a commit that referenced this issue Nov 8, 2023
@bschmalhofer
Copy link
Contributor Author

A quick check with scripts/update.sh showed the new message:

ERROR: OTOBO-otobo.Console.pl-Admin::Package::UpgradeAll-10 Perl: 5.38.0 OS: linux Time: Wed Nov 8 16:53:35 2023

Message: No packages for your framework version 11.0.x found in this repository, it only contains packages for other framework versions.

Looks fine, closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant