[Bug] MangaBaka provider initializes and logs WARN even when enabled=false
Description
Even with mangaBaka.enabled: false configured in application.yml, the MangaBakaDbMetadata logger outputs WARN messages at every container startup regarding missing timestamp and checksum files. The provider appears to initialize and perform IO checks before verifying whether it is actually enabled.
Environment
- Komf Image:
sndxr/komf:latest
- Deployment: Docker Compose
- Configuration: MangaBaka provider explicitly disabled.
Expected Behavior
When a provider is disabled (enabled: false), it should not attempt to initialize, access files, or log warnings related to missing configuration files.
Actual Behavior
The following warnings are logged during the main initialization sequence:
20:25:37.523 [main] WARN snd.komf.providers.mangabaka.db.MangaBakaDbMetadata -- failed to find MangaBaka timestamp file
20:25:37.530 [main] WARN snd.komf.providers.mangabaka.db.MangaBakaDbMetadata -- failed to find MangaBaka checksum file
Root Cause Analysis
The MangaBakaDbMetadata class attempts to load timestamp and checksum files during initialization.
Only after file access fails does the code check the enabled flag. As a result, disabled providers still trigger initialization logic and log warnings.
Attempted Workarounds (unsuccessful)
-
Setting KOMF_LOG_LEVEL=ERROR
Suppresses all warnings globally, hiding legitimate alerts.
-
Creating placeholder files in:
/config/mangabaka/
/config/mangabaka/mangabaka/
Files were still not detected/read.
-
Using logback.xml logger configuration
Not detected/applied by Komf.
-
Using JAVA_OPTS with SimpleLogger flags
No effect.
Impact
- Minor: Log noise in container logs
- No functional impact: App works normally and the provider does not run
- User confusion: File-not-found warnings appear for a provider that is intentionally disabled
Suggested Fix
Reorder initialization in MangaBakaDbMetadata to check the enabled flag before attempting file access:
if (!config.enabled) {
return // Skip initialization entirely
}
// Then attempt to load timestamp/checksum files
Configuration:
metadataProviders:
defaultProviders:
mangaBaka:
priority: 4
enabled: false # Disabled
mode: API
[Bug] MangaBaka provider initializes and logs WARN even when enabled=false
Description
Even with
mangaBaka.enabled: falseconfigured inapplication.yml, theMangaBakaDbMetadatalogger outputsWARNmessages at every container startup regarding missing timestamp and checksum files. The provider appears to initialize and perform IO checks before verifying whether it is actually enabled.Environment
sndxr/komf:latestExpected Behavior
When a provider is disabled (
enabled: false), it should not attempt to initialize, access files, or log warnings related to missing configuration files.Actual Behavior
The following warnings are logged during the
maininitialization sequence:Root Cause Analysis
The
MangaBakaDbMetadataclass attempts to loadtimestampandchecksumfiles during initialization.Only after file access fails does the code check the
enabledflag. As a result, disabled providers still trigger initialization logic and log warnings.Attempted Workarounds (unsuccessful)
Setting
KOMF_LOG_LEVEL=ERRORSuppresses all warnings globally, hiding legitimate alerts.
Creating placeholder files in:
/config/mangabaka//config/mangabaka/mangabaka/Files were still not detected/read.
Using
logback.xmllogger configurationNot detected/applied by Komf.
Using
JAVA_OPTSwithSimpleLoggerflagsNo effect.
Impact
Suggested Fix
Reorder initialization in
MangaBakaDbMetadatato check theenabledflag before attempting file access:Configuration: