typesafehub / sbt-conductr

Typesafe ConductR plugin for sbt
Other
29 stars 22 forks source link

Generate Bundle Endpoint declaration with request ACLs instead of service URIs #144

Closed fsat closed 8 years ago

fsat commented 8 years ago

This is a manual backport from the following sbt-lagom-bundle PR: https://github.com/typesafehub/sbt-lagom-bundle/pull/19

fsat commented 8 years ago

@markusjura - Are we planning to merge sbt-conductr-sandbox into sbt-conductr as well?

When I tried to include the sbt-conductr in the lagom chirper example using sbt publishLocal, I hit the following errors:

Felixs-MBP:activator-lagom-java-chirper felixsatyaputra$ sbt clean
[info] Loading project definition from /Users/felixsatyaputra/workspace/typesafe-fsat/activator-lagom-java-chirper/project
/Users/felixsatyaputra/workspace/typesafe-fsat/activator-lagom-java-chirper/build.sbt:1: error: reference to ByteConversions is ambiguous;
it is imported twice in the same scope by
import _root_.com.typesafe.sbt.bundle.SbtBundle.autoImport._
and import _root_.com.lightbend.conductr.sbt.BundlePlugin.autoImport._
import ByteConversions._
       ^
/Users/felixsatyaputra/workspace/typesafe-fsat/activator-lagom-java-chirper/build.sbt:25: error: reference to BundleKeys is ambiguous;
it is imported twice in the same scope by
import _root_.com.typesafe.sbt.bundle.SbtBundle.autoImport._
and import _root_.com.lightbend.conductr.sbt.BundlePlugin.autoImport._
    BundleKeys.bundleConfVersion := BundleConfVersions.V_1_2_0,
    ^
/Users/felixsatyaputra/workspace/typesafe-fsat/activator-lagom-java-chirper/build.sbt:60: error: reference to BundleKeys is ambiguous;
it is imported twice in the same scope by
import _root_.com.typesafe.sbt.bundle.SbtBundle.autoImport._
and import _root_.com.lightbend.conductr.sbt.BundlePlugin.autoImport._
    BundleKeys.bundleConfVersion := BundleConfVersions.V_1_2_0,
    ^
/Users/felixsatyaputra/workspace/typesafe-fsat/activator-lagom-java-chirper/build.sbt:89: error: reference to BundleKeys is ambiguous;
it is imported twice in the same scope by
import _root_.com.typesafe.sbt.bundle.SbtBundle.autoImport._
and import _root_.com.lightbend.conductr.sbt.BundlePlugin.autoImport._
    BundleKeys.bundleConfVersion := BundleConfVersions.V_1_2_0,
    ^
/Users/felixsatyaputra/workspace/typesafe-fsat/activator-lagom-java-chirper/build.sbt:118: error: reference to BundleKeys is ambiguous;
it is imported twice in the same scope by
import _root_.com.typesafe.sbt.bundle.SbtBundle.autoImport._
and import _root_.com.lightbend.conductr.sbt.BundlePlugin.autoImport._
    BundleKeys.bundleConfVersion := BundleConfVersions.V_1_2_0,
    ^
sbt.compiler.EvalException: Type error in expression
[error] sbt.compiler.EvalException: Type error in expression
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q
Felixs-MBP:activator-lagom-java-chirper felixsatyaputra$

Correct me if I'm wrong, but I think the error above is caused by sbt-conductr-sandbox still pulling down sbt-bundle as its transitive dependency:

Felixs-MBP:activator-lagom-java-chirper felixsatyaputra$ cat project/plugins.sbt
addSbtPlugin("com.lightbend.lagom" % "lagom-sbt-plugin" % "1.0.0-M1")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "3.0.0")
addSbtPlugin("com.github.ddispaltro" % "sbt-reactjs" % "0.5.2")
//addSbtPlugin("com.typesafe.sbt" % "sbt-lagom-bundle" % "1.0.4-SNAPSHOT")
addSbtPlugin("com.lightbend.conductr" % "sbt-conductr" % "1.5.3-SNAPSHOT")
addSbtPlugin("com.typesafe.conductr" % "sbt-conductr-sandbox" % "1.4.2")
huntc commented 8 years ago

@fsat The sandbox has already been merged in.

huntc commented 8 years ago

LGTM

fsat commented 8 years ago

Thank you - I must've missed that.

fsat commented 8 years ago

Manual test successfully done after disabling sbt-conductr-sandbox plugin. The chirper example is used - bundles are built, deployed and made sure they are running.

Felixs-MBP:activator-lagom-java-chirper felixsatyaputra$ conduct info
ID               NAME                    #REP  #STR  #RUN
b7447f1-1011ea4  front-end                  1     0     1
a89a7bb          conductr-kibana            1     0     1
3f6dc0b          activity-stream-impl       1     0     1
85ec66e          chirp-impl                 1     0     1
c77c471          conductr-elasticsearch     1     0     1
1f869c5-044c306  cassandra                  1     0     1
8edf25f          friend-impl                1     0     1
6ad8c92-9c7984a  conductr-haproxy           1     0     1

Once Chirper frontend is up, successfully performed the following test: