Skip to content

SDK enthält Abhängigkeit auf logback [OpenCode 89]

Description of the bug:

Die pom.xml für das FIT-Connect Client SDK enthält in der Version 2.9.0 in der pom.xml eine Abhängigkeit auf die Bibliothek ch.qos.logback:logback-classic. Logback-classic ist ein Logging Framework.

Wird das FIT-Connect Client SDK in ein Projekt eingebunden, so wird dem Projekt automatisch Logback-classic hinzugefügt. Wird in dem Projekt schon ein anderes Logging Framework verwendet (z.B. Log4j), so kann es zu nicht erwarteten oder unvorhersehbarem Logging-Verhalten kommen. Da Logging manchmal nicht explizit getestet wird, kann diese Fehlkonfiguration evtl nicht bemerkt werden.

Good Practice ist es, in einer Bibliothek keine Logging Frameworks als runtime-Abhängigkeiten aufzunehmen, sondern nur eine Abhängigkeit auf eine Logging API als runtime-Abhängigkeit zu definieren. Dann können Anwender:innen bei Verwendung der Bibliothek selber entscheiden, ob und wie diese API in das Logging Framework des Projekts eingebunden wird. Das wäre in diesem Fall eine Abhängigkeit auf slf4j-api. Die Abhängigkeit auf Logback-classic würde dann typischerweise in den test scope wandern.

Workaround für Anwender: Die transitive Abhängigkeit auf Logback-classic kann exkludiert werden, z.B. in Maven:

    <dependency>
      <groupId>dev.fitko.fitconnect.sdk</groupId>
      <artifactId>client</artifactId>
      <version>2.9.0</version>
      <exclusions>
        <exclusion>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-classic</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

Current behavior:

Expected behavior:

Environments:

TEST, STAGE, PROD

Additional Information:

https://gitlab.opencode.de/fitko/feedback/-/issues/89

Dependency / relationship to other issues:

Responsible person / team:

Transfer history to different teams

Contact persons including contact details:

Screenshots / Logs / Requests:

Checklist:

  • Add Severity label
  • Add team label
  • Related/affected issues/stories/epics linked and explained in the bug issue
  • Creation of an automated test
  • Bugfix deployed on DEV
  • Bugfix tested on DEV
  • Bugfix deployed on TEST
  • Bugfix tested on TEST (possibly also by the connection project itself)
  • Successful fix reported to Team Operations (Teams channel)
  • Bugfix deployed on STAGE
  • Bugfix tested on STAGE if necessary
  • Bugfix deployed on PROD
  • Bugfix tested on PROD (possibly also by the connection project itself)
  • Final communication by Team Operations if necessary
  • Internal documentation was checked and updated if necessary
  • External documentation has been checked and updated if necessary
  • Updated changelog if necessary

Approach/Solution:

Release version of the artifact:

Edited by Laura Elges