Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

DockerToActivationFileLogStore.scala contains code derived from Akka Sink.combine without attribution

Geschlossen Anfängerfreundlich
#265 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
78/100
Issue-Typ
Dokumentation
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
scala
Bereich
documentation

Rechercherichtung

Beginne mit build/openwhisk/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/DockerToActivationFileLogStore.scala und der LICENSE auf oberster Ebene. Vergleiche OwSink.combine mit Akka 2.6.12 Sink.combine und prüfe den zugehörigen Kontext in #260. Erledigt ist die Aufgabe, wenn der abgeleitete Code mit dem zutreffenden Hinweistext ordnungsgemäß gekennzeichnet ist oder die kopierte Implementierung und der Kommentar unabhängig ersetzt wurden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

build/openwhisk/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/DockerToActivationFileLogStore.scala (vendored from Apache OpenWhisk, shipped in the 0.9.0-incubating-RC7 source release) contains code that its own comment says was copied from Akka:

object OwSink {

  /**
   * Combines two sinks into one sink using the given strategy. The materialized value is a Tuple2 of the materialized
   * values of either sink. Code basically copied from {@code Sink.combine}
   */
  def combine[T, U, M1, M2](first: Sink[U, M1], second: Sink[U, M2])(
    strategy: Int => Graph[UniformFanOutShape[T, U], NotUsed]): Sink[T, (M1, M2)] = {
    Sink.fromGraph(GraphDSL.create(first, second)((_, _)) { implicit b => (s1, s2) =>
      import GraphDSL.Implicits._
      val d = b.add(strategy(2))

      d ~> s1
      d ~> s2

      SinkShape(d.in)
    })
  }
}

It is adapted from Sink.combine in Akka 2.6.12 (the version OpenWhisk builds against), akka-stream/src/main/scala/akka/stream/scaladsl/Sink.scala lines 315-330, Copyright (C) 2014-2021 Lightbend Inc.

Akka 2.6.x was released under the Apache License 2.0 (Akka moved to the BSL from 2.7.0), so there is no licence conflict, but the derived code is not attributed: the file only carries the ASF header, and the top-level LICENSE does not mention Akka.

Suggested fix, either:

  1. Add a LICENSE entry noting that OwSink.combine in this file is derived from Akka 2.6.12 Sink.combine (Apache-2.0, Copyright Lightbend Inc.), and carry any applicable Akka NOTICE text; or
  2. Rewrite OwSink.combine independently and drop the "copied from" comment. It is a small GraphDSL graph; alternatively, Apache Pekko (the ASF fork of Akka 2.6) has the same Sink.combine, and deriving from Pekko would make this ASF-to-ASF.

The same code is in upstream Apache OpenWhisk. Related: #260.

Vorherrschende Sprache
Python
Sterne
576
Forks
29
Ø Merge
7 Std. 7 Min.
Gemergte PRs (30 T.)
5

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus apache/openserverless

Alle Issues in apache/openserverless

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.