-
Notifications
You must be signed in to change notification settings - Fork 75
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
Eliminate the environment variable OTOBO_SYNC_WITH_S3 #1912
Comments
whether the S3 storage backend is active
Eliminated completely the usage of OTOBO_SYNC_WITH_S3. The information whether the S3 storage backend is active is now solely taken from Kernel/Config.pm . When running with Docker compost it is recommended to activate S3 before building the image. TODO:
|
Merging the PR. Closing ticket only when things look stable. |
before creating a Kernel::Config object
TODO:
|
Issue #1912: the documented way of reading Kernel/Config.pm
The test suite shows two unexpected errors. These should be fixed before closing this issue.
|
As of OTOBO 10.1.5 the environment variable OTOBO_SYNC_WITH_S3 must be set when the S3 backend is used. This applied to:
It is fairly easy to get this wrong. For example, one could do a SysConfig deployment via a webserver that does not have OTOBO_SYNC_WITH_S3 set. This results in a deployment of ZZZAAuto.pm directly into the file system. But the next action, where the variable is set, restores the old version on ZZZAAuto,pm from the S3 backend.
Let's list where and why OTOBO_SYNC_WITH_S3 is currently used:
Kernel/Config.pm and the template _Kernel/Config.pm.docker.dist
This is a guard that allows to active and deactivate the S3 backend. This feature is not really useful as usually the S3 configuration must be adapted manually anyways. In future the adaption could be handled by installer.pl, But that won't require the switch either.
See also #1427 .
Conditional loading of
Kernel/System/Storage/S3
Conditional loading at compile time is useful and convenient. But the loading could be done on first use, implicitly depending on Storage::S3::Active from Kernel/Config.pm
Used in:
Other uses that might be replaced with checking Storage::S3::Active
bin/psgi-bin/otobo.psgi
There should be an early decision whether the
$SyscFromS3Middleware
should be acitvated. This means that a minimal config object must be made available.Gazelle Loader Module Kernel/cpan-lib/Plack/Loader/SyncWithS3.pm
This is bit of a special case, as the web server is started before installer.pl has run. This is no problem for the loader module itself, as Kernel/Config.pm must simply be adapted before Gazelle is started.
The decision whether the loader module is activated is currently done in bin/docker/entrypoint.sh . Maybe this usage can remain for now.
See https://github.com/RotherOSS/otobo/blob/rel-10_1/Kernel/cpan-lib/Plack/Loader/SyncWithS3.pm#L92
bin/docker/quick_setup.pl
This usage is unncessary. There already is a command line option for that.
Unittest scripts
All cases should be converted to checking Storage::S3::Active.
The text was updated successfully, but these errors were encountered: