Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#265 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
scala
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với build/openwhisk/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/DockerToActivationFileLogStore.scala và LICENSE ở cấp cao nhất. So sánh OwSink.combine với Akka 2.6.12 Sink.combine và kiểm tra ngữ cảnh liên quan trong #260. Được xem là hoàn tất khi mã dẫn xuất được ghi công đúng cách với văn bản notice áp dụng, hoặc khi implementation và comment được sao chép đã được thay thế độc lập.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
576
Fork
29
Merge trung bình
3 giờ 26 phút
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/openserverless

Tất cả issue của apache/openserverless

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.