Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Fechada Para iniciantes
#265 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
78/100
Tipo de issue
Documentação
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
scala
Domínio
documentation

Direção de pesquisa

Comece por build/openwhisk/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/DockerToActivationFileLogStore.scala e pelo LICENSE no nível superior. Compare OwSink.combine com Akka 2.6.12 Sink.combine e verifique o contexto relacionado em #260. Está concluído quando o código derivado estiver devidamente atribuído com o texto de aviso aplicável, ou quando a implementação e o comentário copiados forem substituídos de forma independente.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Python
Estrelas
577
Forks
29
Merge médio
3d 39min
PRs com merge (30d)
5

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de apache/openserverless

Todas as issues de apache/openserverless

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.