Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

akka-cluster-typed 2.6 with jackson serialization; server docker deployment; and more #524

Open
wants to merge 42 commits into
base: main
Choose a base branch
from

Conversation

giabao
Copy link
Contributor

@giabao giabao commented Aug 18, 2021

  • When review each commits or review all changes at once, please add ?w=1 (or &w=1) to the url to ignore white space changes.
    Sometimes, the code block are indent at a different level compare to the old code.
  • I have used vagrant / virtualbox to simulate the production environment, then run/tested with sbt deploy task.
  • The new deploy task will deploy server as a container with --network=host. sbtRunners are deployed using docker as before.
  • Because that change, the new deploy task:
    • Require docker installed on scastie.scala-lang.org.
    • Will not stop the old server which is run using java .. -jar ... You need manually stop the old server.
  • I have tested & reviewed the changes many times 😄

+ 2.6.9 -> 2.6.14 for scala 2.10
+ 2.9.0 -> 2.10.0-RC5 for scala 2.12, 2.13
warnings about missing `()` when calling/ overriding some methods
Don't create class fields just for initializing other field
When testing in local machine (not in CI), the order of actual result list is not always [3,2,1]
+ server use reference.conf instead of application.conf
so sbtRunner should use the same naming.
+ This also permit use config in this file in balancer/test
  which has sbtRunner as a Test dependency.
# Changes
+ Also use jackson for serialization instead of java-serializer.
  - Implement in utils/ PlayJackson.scala
  - Config in utils/ reference.conf
  - Config removed: warn-about-java-serializer-usage = false

+ Use Actor discovery [1], so:
  - Remove ActorReconnecting, SbtPing, SbtPong, SbtRunnerConnect, ActorConnected
  - server/ balancer don't need to know sbtRunner's host/port.
    So, we remove some configs such as:
    balancer.remote-hostname, remote-sbt-ports-start,..

+ Type safe configuration:
  - Use ConfigLoader & EnrichedConfig from playframework.
  - Add some case classes:
    BalancerConf (in DispatchActor.scala), SbtConf (in SbtActor.scala)

# Configs change:
+ Add `com.olegych.scastie.data-dir`

# Other notes
+ There is no sender() and parent in akka typed [2]
So, we need explicitly add `replyTo` ActorRef to several messages.

+ Supervision:
  When an exception is thrown and no supervision strategy is defined,
  then actor will stop in akka typed instead of restart as in classic [3]
  So, some actors, such as SbtActor need be explicitly supervising.

+ SbtProcess: Migrated from classic FSM to typed [4]

# Refs
[1] https://doc.akka.io/docs/akka/current/typed/actor-discovery.html
[2] https://doc.akka.io/docs/akka/current/typed/from-classic.html#sender
[3] https://doc.akka.io/docs/akka/current/typed/from-classic.html#supervision
[4] https://doc.akka.io/docs/akka/current/typed/fsm.html
The previous JsValueDeserializer implementation is working
but it's a bit hacking :D
Don't consume input source beyond the ending '}' location of the parsing JsObject
+ deploy, deployServer, deployQuick, deployLocal is now commandAliases instead of TaskKeys.
+ Add dockerCompose task
+ Run `server` by `docker run --network=host ...` instead of `java ...`
+ Fix: deployLocal fail if you don't have access to scastie-secrets github repo.
+ Also remove the unused RUNNER_PRODUCTION env variable
@giabao
Copy link
Contributor Author

giabao commented Aug 18, 2021

Why this PR?

  1. When reading the old code using classic akka, many times, its hard to figure what message send from where to which actor. Using akka-typed, this is very clear.
  2. akka 2.6 require us to explicit enable java serialize (not just warning). So, I switch to jackson (recommend by akka) + play-json (already used by scastie). But I have not tested the performance impact.
  3. Use docker to deploy sbtRunners but not server is ... odd. And the old project/Deployment.scala implementation is verbose but not clear to me.
  4. Old code is not make easy for new contributors. Beside the not clear reason above, I can't follow the guide in CONTRIBUTING.md: sbt deployLocal failed because I don't have access to scastie-secrets repository.
  5. Update things 😄

@vincenzobaz
Copy link
Collaborator

Wow! I have been talking about migrating to akka typed for a while now, I agree it is clearer and can avoid several bugs.
It might take some time review though 😄

akka 2.6 require us to explicit enable java serialize (not just warning). So, I switch to jackson (recommend by akka) + play-json (already used by scastie). But I have not tested the performance impact.

In the past I have used Kryo serialization for across-jvm communication and it worked quite well with very little setup required.
Have you looked into it? It might be more performant than JSON

The new deploy task will deploy server as a container with --network=host. sbtRunners are deployed using docker as before.
Using --network=host has security implications and we have an issue about removing it #295 . We can work around this by creating a new docker network in the deploy task

@@ -272,7 +300,7 @@ class SbtProcess(runTimeout: FiniteDuration,

private def setInputs(inputs: Inputs): Unit = {
val prompt =
s"""shellPrompt := {_ => println(""); "$promptUniqueId" + "\\n "}"""
s"""shellPrompt := {_ => println("$promptUniqueId"); "> "}"""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#520 (comment) I solved the problem mentioned in your issues by using the nix environment provided in the repo for running the project

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@giabao please revert this as it breaks output parsing #520 (comment)

@vincenzobaz
Copy link
Collaborator

Would it be possible to split this PR into smaller ones?

  1. Upgrade many dependencies
  2. Changing build and deploy to docker and vagrant
  3. Migrate to akka typed

I am ok with merging the upgrade with one of the other two although I think that the docker and vagrant modifications should be separated from the akka typed ones

}

import ProgressActor._
class ProgressActor private (ctx: ActorContext[Message]) extends AbstractBehavior[Message](ctx) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could define a more precise hierarchy of messages.
ProgressActor only needs to manage a small subset of the Message subclasses

}
}

private def _reloading(sbtRun: SbtRun): PartialFunction[Event, Behavior[Event]] = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of a partial function, you can define here a Behavior[ProcessOutputEvent] and then compose this more specific behaviors (the same applies for the other _bla methods)

import scala.annotation.{switch, tailrec}
import scala.collection.mutable.{ArrayBuffer, ListBuffer}

class PlayJsonDeserializer[T: Reads](cls: Class[T]) extends StdDeserializer[T](cls) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is all this necessary?

@SethTisue
Copy link
Contributor

SethTisue commented Aug 18, 2021

@patriknw perhaps someone from the Akka team would enjoy taking a look at the Akka aspect of this?

@patriknw
Copy link

perhaps someone from the Akka team would enjoy taking a look at the Akka aspect of this?

is there a specific reason or question, or just for fun?

@SethTisue
Copy link
Contributor

just for fun. and since Scastie is an important utility for the Scala community and it's cool to see it using Akka, especially if it can get on modern Akka

@OlegYch
Copy link
Contributor

OlegYch commented Sep 3, 2021

@OlegYch
Copy link
Contributor

OlegYch commented Sep 15, 2021

@giabao i did a rebase at https://github.com/scalacenter/scastie/tree/akka-typed
most of the time when i do 'startAll' locally no runners connects to the server, here is the log:

olegych@DESKTOP-EKE9IQD:/mnt/d/Distrib/Coding/Java/scala/scastie$ sbt
[info] welcome to sbt 1.5.5 (Private Build Java 1.8.0_242)
[info] loading project definition from /mnt/d/Distrib/Coding/Java/scala/scastie/project/project/project/project
[info] loading project definition from /mnt/d/Distrib/Coding/Java/scala/scastie/project/project/project
[info] loading settings for project scastie-build-build from plugins.sbt ...
[info] loading project definition from /mnt/d/Distrib/Coding/Java/scala/scastie/project/project
[info] loading settings for project scastie-build from build.sbt,plugins.sbt ...
[info] loading project definition from /mnt/d/Distrib/Coding/Java/scala/scastie/project
[info] loading settings for project scastie from build.sbt ...
[info] resolving key references (20400 settings) ...
[info] set current project to scastie (in build file:/mnt/d/Distrib/Coding/Java/scala/scastie/)
[info] sbt server started at local:///home/olegych/.sbt/1.0/server/3d6e302eede88d2cf621/sock
[info] started sbt server
sbt:scastie> startAll
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/runtime-scala/target/jvm-2.12/runtime-scala_2.12-1.0.0-SNAPSHOT.pom
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/sbt-scastie/target/scala-2.12/sbt-1.0/sbt-scastie-1.0.0-SNAPSHOT.pom
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/api/target/jvm-2.10/api_2.10-0.30.0-SNAPSHOT.pom
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/runtime-scala/target/js-2.13/runtime-scala_sjs1_2.13-1.0.0-SNAPSHOT.pom
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/api/target/jvm-2.13/api_2.13-0.30.0-SNAPSHOT.pom
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/api/target/jvm-2.11/api_2.11-0.30.0-SNAPSHOT.pom
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/runtime-scala/target/jvm-2.13/runtime-scala_2.13-1.0.0-SNAPSHOT.pom
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/api/target/jvm-3/api_3-0.30.0-SNAPSHOT.pom
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/runtime-scala/target/js-2.12/runtime-scala_sjs1_2.12-1.0.0-SNAPSHOT.pom
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/runtime-scala/target/jvm-2.11/runtime-scala_2.11-1.0.0-SNAPSHOT.pom
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/runtime-scala/target/jvm-2.10/runtime-scala_2.10-1.0.0-SNAPSHOT.pom
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/api/target/jvm-2.12/api_2.12-0.30.0-SNAPSHOT.pom
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/api/target/js-2.12/api_sjs1_2.12-0.30.0-SNAPSHOT.pom
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/api/target/js-2.13/api_sjs1_2.13-0.30.0-SNAPSHOT.pom
[info] Wrote /mnt/d/Distrib/Coding/Java/scala/scastie/runtime-scala/target/jvm-3/runtime-scala_3-1.0.0-SNAPSHOT.pom
[info] :: delivering :: org.scastie#api_2.12;0.30.0-SNAPSHOT :: 0.30.0-SNAPSHOT :: integration :: Wed Sep 15 12:56:46 GMT 2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/api/target/jvm-2.12/ivy-0.30.0-SNAPSHOT.xml
[info]  published api_2.12 to /home/olegych/.ivy2/local/org.scastie/api_2.12/0.30.0-SNAPSHOT/poms/api_2.12.pom
[info]  published api_2.12 to /home/olegych/.ivy2/local/org.scastie/api_2.12/0.30.0-SNAPSHOT/jars/api_2.12.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/api_2.12/0.30.0-SNAPSHOT/ivys/ivy.xml
[info] :: delivering :: org.scastie#api_2.13;0.30.0-SNAPSHOT :: 0.30.0-SNAPSHOT :: integration :: Wed Sep 15 12:56:47 GMT 2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/api/target/jvm-2.13/ivy-0.30.0-SNAPSHOT.xml
[info]  published api_2.13 to /home/olegych/.ivy2/local/org.scastie/api_2.13/0.30.0-SNAPSHOT/poms/api_2.13.pom
[info]  published api_2.13 to /home/olegych/.ivy2/local/org.scastie/api_2.13/0.30.0-SNAPSHOT/jars/api_2.13.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/api_2.13/0.30.0-SNAPSHOT/ivys/ivy.xml
[info] :: delivering :: org.scastie#runtime-scala_2.12;1.0.0-SNAPSHOT :: 1.0.0-SNAPSHOT :: integration :: Wed Sep 15 12:56:47 GMT 2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/runtime-scala/target/jvm-2.12/ivy-1.0.0-SNAPSHOT.xml
[info]  published runtime-scala_2.12 to /home/olegych/.ivy2/local/org.scastie/runtime-scala_2.12/1.0.0-SNAPSHOT/poms/runtime-scala_2.12.pom
[info]  published runtime-scala_2.12 to /home/olegych/.ivy2/local/org.scastie/runtime-scala_2.12/1.0.0-SNAPSHOT/jars/runtime-scala_2.12.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/runtime-scala_2.12/1.0.0-SNAPSHOT/ivys/ivy.xml
[info] :: delivering :: org.scastie#api_sjs1_2.12;0.30.0-SNAPSHOT :: 0.30.0-SNAPSHOT :: integration :: Wed Sep 15 12:56:47 GMT 2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/api/target/js-2.12/ivy-0.30.0-SNAPSHOT.xml
[info]  published api_sjs1_2.12 to /home/olegych/.ivy2/local/org.scastie/api_sjs1_2.12/0.30.0-SNAPSHOT/poms/api_sjs1_2.12.pom
[info]  published api_sjs1_2.12 to /home/olegych/.ivy2/local/org.scastie/api_sjs1_2.12/0.30.0-SNAPSHOT/jars/api_sjs1_2.12.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/api_sjs1_2.12/0.30.0-SNAPSHOT/ivys/ivy.xml
[info] :: delivering :: org.scastie#runtime-scala_2.13;1.0.0-SNAPSHOT :: 1.0.0-SNAPSHOT :: integration :: Wed Sep 15 12:56:47 GMT 2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/runtime-scala/target/jvm-2.13/ivy-1.0.0-SNAPSHOT.xml
[info]  published runtime-scala_2.13 to /home/olegych/.ivy2/local/org.scastie/runtime-scala_2.13/1.0.0-SNAPSHOT/poms/runtime-scala_2.13.pom
[info]  published runtime-scala_2.13 to /home/olegych/.ivy2/local/org.scastie/runtime-scala_2.13/1.0.0-SNAPSHOT/jars/runtime-scala_2.13.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/runtime-scala_2.13/1.0.0-SNAPSHOT/ivys/ivy.xml
[info] :: delivering :: org.scastie#api_2.10;0.30.0-SNAPSHOT :: 0.30.0-SNAPSHOT :: integration :: Wed Sep 15 12:56:47 GMT 2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/api/target/jvm-2.10/ivy-0.30.0-SNAPSHOT.xml
[info]  published api_2.10 to /home/olegych/.ivy2/local/org.scastie/api_2.10/0.30.0-SNAPSHOT/poms/api_2.10.pom
[info]  published api_2.10 to /home/olegych/.ivy2/local/org.scastie/api_2.10/0.30.0-SNAPSHOT/jars/api_2.10.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/api_2.10/0.30.0-SNAPSHOT/ivys/ivy.xml
[info] :: delivering :: org.scastie#runtime-scala_sjs1_2.12;1.0.0-SNAPSHOT :: 1.0.0-SNAPSHOT :: integration :: Wed Sep15 12:56:47 GMT 2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/runtime-scala/target/js-2.12/ivy-1.0.0-SNAPSHOT.xml
[info] :: delivering :: org.scastie#api_sjs1_2.13;0.30.0-SNAPSHOT :: 0.30.0-SNAPSHOT :: integration :: Wed Sep 15 12:56:47 GMT 2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/api/target/js-2.13/ivy-0.30.0-SNAPSHOT.xml
[info] :: delivering :: org.scastie#runtime-scala_sjs1_2.13;1.0.0-SNAPSHOT :: 1.0.0-SNAPSHOT :: integration :: Wed Sep15 12:56:47 GMT 2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/runtime-scala/target/js-2.13/ivy-1.0.0-SNAPSHOT.xml
[info] :: delivering :: org.scastie#api_2.11;0.30.0-SNAPSHOT :: 0.30.0-SNAPSHOT :: integration :: Wed Sep 15 12:56:47 GMT 2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/api/target/jvm-2.11/ivy-0.30.0-SNAPSHOT.xml
[info] :: delivering :: org.scastie#runtime-scala_2.10;1.0.0-SNAPSHOT :: 1.0.0-SNAPSHOT :: integration :: Wed Sep 15 12:56:47 GMT 2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/runtime-scala/target/jvm-2.10/ivy-1.0.0-SNAPSHOT.xml
[info] :: delivering :: org.scastie#runtime-scala_2.11;1.0.0-SNAPSHOT :: 1.0.0-SNAPSHOT :: integration :: Wed Sep 15 12:56:47 GMT 2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/runtime-scala/target/jvm-2.11/ivy-1.0.0-SNAPSHOT.xml
[info]  published runtime-scala_2.10 to /home/olegych/.ivy2/local/org.scastie/runtime-scala_2.10/1.0.0-SNAPSHOT/poms/runtime-scala_2.10.pom
[info]  published runtime-scala_2.10 to /home/olegych/.ivy2/local/org.scastie/runtime-scala_2.10/1.0.0-SNAPSHOT/jars/runtime-scala_2.10.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/runtime-scala_2.10/1.0.0-SNAPSHOT/ivys/ivy.xml
[info]  published api_2.11 to /home/olegych/.ivy2/local/org.scastie/api_2.11/0.30.0-SNAPSHOT/poms/api_2.11.pom
[info]  published api_2.11 to /home/olegych/.ivy2/local/org.scastie/api_2.11/0.30.0-SNAPSHOT/jars/api_2.11.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/api_2.11/0.30.0-SNAPSHOT/ivys/ivy.xml
[info]  published runtime-scala_sjs1_2.13 to /home/olegych/.ivy2/local/org.scastie/runtime-scala_sjs1_2.13/1.0.0-SNAPSHOT/poms/runtime-scala_sjs1_2.13.pom
[info]  published runtime-scala_sjs1_2.13 to /home/olegych/.ivy2/local/org.scastie/runtime-scala_sjs1_2.13/1.0.0-SNAPSHOT/jars/runtime-scala_sjs1_2.13.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/runtime-scala_sjs1_2.13/1.0.0-SNAPSHOT/ivys/ivy.xml
[info] :: delivering :: org.scastie#sbt-scastie;1.0.0-SNAPSHOT :: 1.0.0-SNAPSHOT :: integration :: Wed Sep 15 12:56:47GMT 2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/sbt-scastie/target/scala-2.12/sbt-1.0/ivy-1.0.0-SNAPSHOT.xml
[info]  published api_sjs1_2.13 to /home/olegych/.ivy2/local/org.scastie/api_sjs1_2.13/0.30.0-SNAPSHOT/poms/api_sjs1_2.13.pom
[info]  published api_sjs1_2.13 to /home/olegych/.ivy2/local/org.scastie/api_sjs1_2.13/0.30.0-SNAPSHOT/jars/api_sjs1_2.13.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/api_sjs1_2.13/0.30.0-SNAPSHOT/ivys/ivy.xml
[info]  published runtime-scala_sjs1_2.12 to /home/olegych/.ivy2/local/org.scastie/runtime-scala_sjs1_2.12/1.0.0-SNAPSHOT/poms/runtime-scala_sjs1_2.12.pom
[info]  published runtime-scala_sjs1_2.12 to /home/olegych/.ivy2/local/org.scastie/runtime-scala_sjs1_2.12/1.0.0-SNAPSHOT/jars/runtime-scala_sjs1_2.12.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/runtime-scala_sjs1_2.12/1.0.0-SNAPSHOT/ivys/ivy.xml
[info]  published sbt-scastie to /home/olegych/.ivy2/local/org.scastie/sbt-scastie/scala_2.12/sbt_1.0/1.0.0-SNAPSHOT/poms/sbt-scastie.pom
[info]  published sbt-scastie to /home/olegych/.ivy2/local/org.scastie/sbt-scastie/scala_2.12/sbt_1.0/1.0.0-SNAPSHOT/jars/sbt-scastie.jar
[info]  published sbt-scastie to /home/olegych/.ivy2/local/org.scastie/sbt-scastie/scala_2.12/sbt_1.0/1.0.0-SNAPSHOT/srcs/sbt-scastie-sources.jar
[info]  published sbt-scastie to /home/olegych/.ivy2/local/org.scastie/sbt-scastie/scala_2.12/sbt_1.0/1.0.0-SNAPSHOT/docs/sbt-scastie-javadoc.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/sbt-scastie/scala_2.12/sbt_1.0/1.0.0-SNAPSHOT/ivys/ivy.xml
[info] :: delivering :: org.scastie#api_3;0.30.0-SNAPSHOT :: 0.30.0-SNAPSHOT :: integration :: Wed Sep 15 12:56:47 GMT2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/api/target/jvm-3/ivy-0.30.0-SNAPSHOT.xml
[info] :: delivering :: org.scastie#runtime-scala_3;1.0.0-SNAPSHOT :: 1.0.0-SNAPSHOT :: integration :: Wed Sep 15 12:56:47 GMT 2021
[info]  delivering ivy file to /mnt/d/Distrib/Coding/Java/scala/scastie/runtime-scala/target/jvm-3/ivy-1.0.0-SNAPSHOT.xml
[info]  published runtime-scala_2.11 to /home/olegych/.ivy2/local/org.scastie/runtime-scala_2.11/1.0.0-SNAPSHOT/poms/runtime-scala_2.11.pom
[info]  published runtime-scala_2.11 to /home/olegych/.ivy2/local/org.scastie/runtime-scala_2.11/1.0.0-SNAPSHOT/jars/runtime-scala_2.11.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/runtime-scala_2.11/1.0.0-SNAPSHOT/ivys/ivy.xml
[info]  published runtime-scala_3 to /home/olegych/.ivy2/local/org.scastie/runtime-scala_3/1.0.0-SNAPSHOT/poms/runtime-scala_3.pom
[info]  published runtime-scala_3 to /home/olegych/.ivy2/local/org.scastie/runtime-scala_3/1.0.0-SNAPSHOT/jars/runtime-scala_3.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/runtime-scala_3/1.0.0-SNAPSHOT/ivys/ivy.xml
[info]  published api_3 to /home/olegych/.ivy2/local/org.scastie/api_3/0.30.0-SNAPSHOT/poms/api_3.pom
[info]  published api_3 to /home/olegych/.ivy2/local/org.scastie/api_3/0.30.0-SNAPSHOT/jars/api_3.jar
[info]  published ivy to /home/olegych/.ivy2/local/org.scastie/api_3/0.30.0-SNAPSHOT/ivys/ivy.xml
[info] Application sbtRunner not yet started
[info] Starting application sbtRunner in the background ...
sbtRunner Starting com.olegych.scastie.sbt.SbtMain.main()
[success] Total time: 2 s, completed Sep 15, 2021 12:56:48 PM
sbtRunner 12:56:49.583 INFO  a.e.s.Slf4jLogger:105 | Slf4jLogger started
sbtRunner 12:56:50.012 INFO  a.r.a.t.ArteryTcpTransport:96 | Remoting started with transport [Artery tcp]; listening on address [akka://sys@127.0.0.1:5150] with UID [-565053361472979301]
sbtRunner 12:56:50.040 INFO  a.c.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:5150] - Starting up, Akka version [2.6.15] ...
[info] Application server not yet started
[info] Starting application server in the background ...
server Starting com.olegych.scastie.web.ServerMain.main()
[success] Total time: 2 s, completed Sep 15, 2021 12:56:50 PM
sbtRunner 12:56:50.167 INFO  a.c.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:5150] - Registered cluster JMX MBean [akka:type=Cluster]
sbtRunner 12:56:50.167 INFO  a.c.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:5150] - Started up successfully
sbtRunner 12:56:50.240 INFO  a.c.s.SplitBrainResolver:96 | SBR started. Config: strategy [KeepMajority], stable-after [20 seconds], down-all-when-unstable [15 seconds], selfUniqueAddress [akka://sys@127.0.0.1:5150#-565053361472979301], selfDc [default].
[info] Starting webpack-dev-server
[success] Total time: 1 s, completed Sep 15, 2021 12:56:50 PM
sbtRunner 12:56:51.200 INFO  c.o.s.s.SbtMain$:28 | # Scastie sbt runner started with config:
sbtRunner akka.remote.artery {
sbtRunner   canonical: {
sbtRunner       "hostname" : "127.0.0.1",
sbtRunner       "port" : 5150
sbtRunner   }
sbtRunner   bind: {
sbtRunner       "bind-timeout" : "3s",
sbtRunner       "hostname" : "",
sbtRunner       "port" : ""
sbtRunner   }
sbtRunner }
sbtRunner com.olegych.scastie.sbt: {
sbtRunner     "remapSourceMapUrlBase" : "http://localhost:9000",
sbtRunner     "runTimeout" : "30s",
sbtRunner     "sbtReloadTimeout" : "100s"
sbtRunner }
sbtRunner 12:56:51.209 INFO  c.o.s.s.SbtActor:33 | *** SbtRunner preStart ***
sbtRunner 12:56:51.626 INFO  c.o.s.s.SbtProcess:119 | started process Actor[akka://sys/user/SbtActor/SbtRunner/sbt-process-1KWwu32c5V#-39132184]
sbtRunner -- Initializing --
sbtRunner preStart
sbtRunner process started: Some(32024)
server akka.event.slf4j.Slf4jLogger:105 | Slf4jLogger started
server a.r.artery.tcp.ArteryTcpTransport:96 | Remoting started with transport [Artery tcp]; listening on address [akka://sys@127.0.0.1:15000] with UID [7545888869422558265]
server akka.cluster.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:15000] - Starting up, Akka version [2.6.15] ...
server akka.cluster.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:15000] - Registered cluster JMX MBean [akka:type=Cluster]
server akka.cluster.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:15000] - Started up successfully
server akka.cluster.sbr.SplitBrainResolver:96 | SBR started. Config: strategy [KeepMajority], stable-after [20 seconds], down-all-when-unstable [15 seconds], selfUniqueAddress [akka://sys@127.0.0.1:15000#7545888869422558265], selfDc [default].
sbtRunner > 1 1664ms: [info] welcome to sbt 1.5.5 (Private Build Java 1.8.0_242)
server ServerMain:38 | # Scastie sever started with config:
server akka.remote.artery {
server   canonical: {
server       "hostname" : "127.0.0.1",
server       "port" : 15000
server   }
server   bind: {
server       "bind-timeout" : "3s",
server       "hostname" : "",
server       "port" : ""
server   }
server }
server com.olegych.scastie.web.bind: {
server     "hostname" : "0.0.0.0",
server     "port" : 9000
server }
sbtRunner 12:56:53.599 INFO  a.c.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:5150] - Received InitJoin message from [Actor[akka://sys@127.0.0.1:15000/system/cluster/core/daemon/firstSeedNodeProcess-1#-304654228]], but this node is not initialized yet
sbtRunner 12:56:53.600 INFO  a.c.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:5150] - Received InitJoin message from [Actor[akka://sys@127.0.0.1:15000/system/cluster/core/daemon/firstSeedNodeProcess-1#-304654228]], but this node is not initialized yet
server akka.cluster.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:15000] - Received InitJoin message from [Actor[akka://sys@127.0.0.1:5150/system/cluster/core/daemon/firstSeedNodeProcess-1#10222652]], but this node is not initialized yet
server akka.cluster.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:15000] - Received InitJoin message from [Actor[akka://sys@127.0.0.1:5150/system/cluster/core/daemon/firstSeedNodeProcess-1#10222652]], but this node is not initialized yet
server akka.cluster.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:15000] - Received InitJoin message from [Actor[akka://sys@127.0.0.1:5150/system/cluster/core/daemon/firstSeedNodeProcess-1#10222652]], but this node is not initialized yet
server akka.cluster.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:15000] - Received InitJoin message from [Actor[akka://sys@127.0.0.1:5150/system/cluster/core/daemon/firstSeedNodeProcess-1#10222652]], but this node is not initialized yet
server akka.cluster.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:15000] - Received InitJoinNack message from [Actor[akka://sys@127.0.0.1:5150/system/cluster/core/daemon#1109598997]] to [akka://sys@127.0.0.1:15000]
sbtRunner 12:56:53.634 INFO  a.c.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:5150] - Received InitJoinNack messagefrom [Actor[akka://sys@127.0.0.1:15000/system/cluster/core/daemon#1815040798]] to [akka://sys@127.0.0.1:5150]
server akka.cluster.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:15000] - Node [akka://sys@127.0.0.1:15000] is JOINING itself (with roles [dc-default], version [0.0.0]) and forming new cluster
server akka.cluster.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:15000] - is the new leader among reachable nodes (more leaders may exist)
server akka.cluster.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:15000] - Leader is moving node [akka://sys@127.0.0.1:15000] to [Up]
server akka.cluster.sbr.SplitBrainResolver:96 | This node is now the leader responsible for taking SBR decisions amongthe reachable nodes (more leaders may exist).
server a.a.t.i.LogMessagesInterceptor:181 | actor [akka://sys/user/DispatchActor] received message: ListingResponse(Listing(ServiceKey[com.olegych.scastie.util.SbtMessage](SbtRunner),Set(),Set(),true))
sbtRunner 12:56:53.655 INFO  a.c.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:5150] - Node [akka://sys@127.0.0.1:5150] is JOINING itself (with roles [dc-default], version [0.0.0]) and forming new cluster
sbtRunner 12:56:53.655 INFO  a.c.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:5150] - is the new leader among reachable nodes (more leaders may exist)
sbtRunner 12:56:53.672 INFO  a.c.Cluster:96 | Cluster Node [akka://sys@127.0.0.1:5150] - Leader is moving node [akka://sys@127.0.0.1:5150] to [Up]
sbtRunner 12:56:53.700 INFO  a.c.s.SplitBrainResolver:96 | This node is now the leader responsible for taking SBR decisions among the reachable nodes (more leaders may exist).
sbtRunner > 2 2385ms: [info] loading settings for project scastie5218141248584850780-build from plugins.sbt ...
sbtRunner > 3 560ms: [info] loading project definition from /tmp/scastie5218141248584850780/project
sbtRunner > 4 2433ms: [info] loading settings for project scastie5218141248584850780 from build.sbt ...
sbtRunner > 5 77ms: [info] set current project to scastie5218141248584850780 (in build file:/tmp/scastie5218141248584850780/)
sbtRunner > 6 352ms: 1KWwu32c5V
sbtRunner -- Ready --
server a.a.t.i.LogMessagesInterceptor:181 | actor [akka://sys/user/DispatchActor] received message: FetchSnippet(Actor[akka://sys/temp/DispatchActor$a#0],tETcFjsKQc6k2umnMu8qlA)
server a.a.t.i.LogMessagesInterceptor:181 | actor [akka://sys/user/DispatchActor] received message: ReceiveStatus(Actor[akka://sys/user/StatusActor#-1931079177],Actor[akka://sys/system/Materializers/StreamSupervisor-0/$$f#454571685])
server a.a.t.i.LogMessagesInterceptor:181 | actor [akka://sys/user/DispatchActor] received message: FetchSnippet(Actor[akka://sys/temp/DispatchActor$b#0],tETcFjsKQc6k2umnMu8qlA)
server a.a.t.i.LogMessagesInterceptor:181 | actor [akka://sys/user/DispatchActor] received message: ReceiveStatus(Actor[akka://sys/user/StatusActor#-1931079177],Actor[akka://sys/system/Materializers/StreamSupervisor-0/$$k#1555777694])
server a.a.t.i.LogMessagesInterceptor:181 | actor [akka://sys/user/DispatchActor] received message: FetchSnippet(Actor[akka://sys/temp/DispatchActor$c#0],tETcFjsKQc6k2umnMu8qlA)
server a.a.t.i.LogMessagesInterceptor:181 | actor [akka://sys/user/DispatchActor] received message: ReceiveStatus(Actor[akka://sys/user/StatusActor#-1931079177],Actor[akka://sys/system/Materializers/StreamSupervisor-0/$$p#-1524643322])
server a.a.t.i.LogMessagesInterceptor:181 | actor [akka://sys/user/DispatchActor] received message: FetchSnippet(Actor[akka://sys/temp/DispatchActor$d#0],tETcFjsKQc6k2umnMu8qlA)
server a.a.t.i.LogMessagesInterceptor:181 | actor [akka://sys/user/DispatchActor] received message: ReceiveStatus(Actor[akka://sys/user/StatusActor#-1931079177],Actor[akka://sys/system/Materializers/StreamSupervisor-0/$$u#347963197])
server a.a.t.i.LogMessagesInterceptor:181 | actor [akka://sys/user/DispatchActor] received message: FetchSnippet(Actor[akka://sys/temp/DispatchActor$e#0],tETcFjsKQc6k2umnMu8qlA)
server a.a.t.i.LogMessagesInterceptor:181 | actor [akka://sys/user/DispatchActor] received message: ReceiveStatus(Actor[akka://sys/user/StatusActor#-1931079177],Actor[akka://sys/system/Materializers/StreamSupervisor-0/$$z#-122589149])
server a.a.t.i.LogMessagesInterceptor:181 | actor [akka://sys/user/DispatchActor] received message: ForkSnippet(Actor[akka://sys/temp/DispatchActor$f#0],tETcFjsKQc6k2umnMu8qlA,InputsWithIpAndUser(isWorksheetMode = true
server target = Scala 2.13.6
server libraries
server
server
server sbtConfigExtra
server default
server
server sbtPluginsConfigExtra
server
server
server code
server   class A()
server println(1)
server // object A extends App
server ,UserTrace(unknown,None)))
server a.a.t.i.LogMessagesInterceptor:181 | actor [akka://sys/user/DispatchActor] received message: Run(InputsWithIpAndUser(isWorksheetMode = true
server target = Scala 2.13.6
server libraries
server
server
server sbtConfigExtra
server default
server
server sbtPluginsConfigExtra
server
server
server code
server   class A()
server println(1)
server // object A extends App
server ,UserTrace(unknown,None)),SC4XA7H5RxaoGaBymPiRIg)
server c.o.scastie.balancer.DispatchActor:138 | id: SC4XA7H5RxaoGaBymPiRIg, ip: unknown run inputs: isWorksheetMode = true
server target = Scala 2.13.6
server libraries
server
server
server sbtConfigExtra
server default
server
server sbtPluginsConfigExtra
server
server
server code
server   class A()
server println(1)
server // object A extends App
server
server c.o.scastie.balancer.LoadBalancer:42 | Task added: TaskId(SC4XA7H5RxaoGaBymPiRIg)
server c.o.scastie.balancer.LoadBalancer:74 | All instances are down
sbt:scastie>

can you take a look at it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants