linkerd / linkerd-examples

Examples of how to configure and run linkerd
https://linkerd.io
Apache License 2.0
431 stars 221 forks source link

Failed to compile custom identifier plugin #242

Closed zillani closed 5 years ago

zillani commented 5 years ago

HelloWorldIdentifierConfig.scala fails to compile. issue-type: bug scala version: 2.12.2 JVM: 8 steps to reproduce:

Error log:

[error] /root/linkerd-official/linkerd-examples/plugins/header-classifier/src/main/scala/io/buoyant/http/identifiers/HelloWorldIdentifierConfig.scala:10: class HelloWorldIdentifierConfig needs to be abstract, since method newIdentifier in class HttpIdentifierConfig of type (prefix: com.twitter.finagle.Path, baseDtab: () => com.twitter.finagle.Dtab, routerParams: com.twitter.finagle.Stack.Params)io.buoyant.router.RoutingFactory.Identifier[com.twitter.finagle.http.Request] is not defined
[error] class HelloWorldIdentifierConfig extends HttpIdentifierConfig{
[error]       ^
[error] /root/linkerd-official/linkerd-examples/plugins/header-classifier/src/main/scala/io/buoyant/http/identifiers/HelloWorldIdentifierConfig.scala:15: method newIdentifier overrides nothing.
[error] Note: the super classes of class HelloWorldIdentifierConfig contain the following, non final members named newIdentifier:
[error] def newIdentifier(prefix: com.twitter.finagle.Path,baseDtab: () => com.twitter.finagle.Dtab,routerParams: com.twitter.finagle.Stack.Params): io.buoyant.router.RoutingFactory.Identifier[com.twitter.finagle.http.Request]
[error]   override def newIdentifier(prefix: Path, baseDtab: () => Dtab): Identifier[Request] = {
[error]                ^
[error] two errors found
zillani commented 5 years ago

The Issue occurred due to this change, https://github.com/linkerd/linkerd/commit/6828f31508f3a961f108e04cb25898e3dd6e61b2#diff-f1d21d8c3cca2d585850659be8bcc174 Thanks to @dadjeibaah for addressing this!

dadjeibaah commented 5 years ago

Issue fixed by #243