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

fix: show JVM log messages #3847

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: show JVM log messages
  • Loading branch information
stuartwdouglas committed Dec 23, 2024
commit 396da6679e5136e55d9d0774be606e6909568844
10 changes: 6 additions & 4 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ PROTOS_OUT := "backend/protos/xyz/block/ftl/console/v1/console.pb.go " + \
JVM_RUNTIME_IN := "jvm-runtime/ftl-runtime/pom.xml " + \
"jvm-runtime/ftl-runtime/java/runtime/src " + \
"jvm-runtime/ftl-runtime/kotlin/runtime/src " + \
"jvm-runtime/ftl-runtime/common/deployment/src"
JVM_RUNTIME_OUT := "jvm-runtime/ftl-runtime//java/runtime/target/ftl-java-runtime-1.0-SNAPSHOT.jar " + \
"jvm-runtime/ftl-runtime//kotlin/runtime/target/ftl-kotlin-runtime-1.0-SNAPSHOT.jar " + \
"jvm-runtime/ftl-runtime//common/runtime/target/ftl-jvm-runtime-1.0-SNAPSHOT.jar"
"jvm-runtime/ftl-runtime/common/deployment/src " + \
"jvm-runtime/ftl-runtime/common/runtime/src"
JVM_RUNTIME_OUT := "jvm-runtime/ftl-runtime/java/runtime/target/ftl-java-runtime-1.0-SNAPSHOT.jar " + \
"jvm-runtime/ftl-runtime/kotlin/runtime/target/ftl-kotlin-runtime-1.0-SNAPSHOT.jar " + \
"jvm-runtime/ftl-runtime/common/deployment/target/ftl-jvm-runtime-deployment-1.0-SNAPSHOT.jar " + \
"jvm-runtime/ftl-runtime/common/runtime/target/ftl-jvm-runtime-1.0-SNAPSHOT.jar"

# Configuration for building Docker images
DOCKER_IMAGES := '''
Expand Down
4 changes: 2 additions & 2 deletions jvm-runtime/plugin/common/java_plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestJavaConfigDefaults(t *testing.T) {
dir: "testdata/kotlin/echo",
expected: moduleconfig.CustomDefaults{
Build: optional.Some("mvn -B clean package"),
DevModeBuild: optional.Some("mvn clean quarkus:dev"),
DevModeBuild: optional.Some("mvn -Dquarkus.console.enabled=false -q clean quarkus:dev"),
DeployDir: "target",
LanguageConfig: map[string]any{
"build-tool": "maven",
Expand All @@ -50,7 +50,7 @@ func TestJavaConfigDefaults(t *testing.T) {
dir: "testdata/kotlin/external",
expected: moduleconfig.CustomDefaults{
Build: optional.Some("mvn -B clean package"),
DevModeBuild: optional.Some("mvn clean quarkus:dev"),
DevModeBuild: optional.Some("mvn -Dquarkus.console.enabled=false -q clean quarkus:dev"),
DeployDir: "target",
LanguageConfig: map[string]any{
"build-tool": "maven",
Expand Down
4 changes: 2 additions & 2 deletions jvm-runtime/plugin/common/jvmcommon.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func (s *Service) runQuarkusDev(ctx context.Context, req *connect.Request[langpb
command.Env = append(command.Env, fmt.Sprintf("FTL_RUNNER_INFO=%s", runnerInfoFile))
command.Stdout = os.Stdout
command.Stderr = os.Stderr
err = command.RunBuffered(ctx)
err = command.Run()
if err != nil {
logger.Errorf(err, "Dev mode process exited with error")
} else {
Expand Down Expand Up @@ -610,7 +610,7 @@ func (s *Service) ModuleConfigDefaults(ctx context.Context, req *connect.Request
buildGradleKts := filepath.Join(dir, "build.gradle.kts")
if fileExists(pom) {
defaults.LanguageConfig.Fields["build-tool"] = structpb.NewStringValue(JavaBuildToolMaven)
defaults.DevModeBuild = ptr("mvn clean quarkus:dev")
defaults.DevModeBuild = ptr("mvn -Dquarkus.console.enabled=false -q clean quarkus:dev")
defaults.Build = ptr("mvn -B clean package")
defaults.DeployDir = "target"
} else if fileExists(buildGradle) || fileExists(buildGradleKts) {
Expand Down
Loading