Archived
Compare commits
4
Commits
v0.1.1
..
v0.1.2-rc2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b45fce813 | ||
|
|
461ebe44ab | ||
|
|
116f1fbb59 | ||
|
|
53f0991f6f |
No files matched your search
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/).
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
||||||
|
|
||||||
|
## [0.1.2] - 2026-01-21
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- IPC communication fails in native binary due to missing Jackson reflection config
|
||||||
|
|
||||||
## [0.1.1] - 2026-01-21
|
## [0.1.1] - 2026-01-21
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
@@ -27,5 +32,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|||||||
- Jobs that fail to start now properly transition to FAILED state
|
- Jobs that fail to start now properly transition to FAILED state
|
||||||
- Startup errors are written to stderr.log for visibility
|
- Startup errors are written to stderr.log for visibility
|
||||||
|
|
||||||
|
[0.1.2]: https://github.com/samson-media/barn/releases/tag/v0.1.2
|
||||||
[0.1.1]: https://github.com/samson-media/barn/releases/tag/v0.1.1
|
[0.1.1]: https://github.com/samson-media/barn/releases/tag/v0.1.1
|
||||||
[0.1.0]: https://github.com/samson-media/barn/releases/tag/v0.1.0
|
[0.1.0]: https://github.com/samson-media/barn/releases/tag/v0.1.0
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.samsonmedia</groupId>
|
<groupId>com.samsonmedia</groupId>
|
||||||
<artifactId>barn</artifactId>
|
<artifactId>barn</artifactId>
|
||||||
<version>0.1.1</version>
|
<version>0.1.2</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>Barn</name>
|
<name>Barn</name>
|
||||||
@@ -393,6 +393,7 @@
|
|||||||
<buildArg>--no-fallback</buildArg>
|
<buildArg>--no-fallback</buildArg>
|
||||||
<buildArg>-H:+ReportExceptionStackTraces</buildArg>
|
<buildArg>-H:+ReportExceptionStackTraces</buildArg>
|
||||||
<buildArg>--enable-url-protocols=https</buildArg>
|
<buildArg>--enable-url-protocols=https</buildArg>
|
||||||
|
<buildArg>-march=compatibility</buildArg>
|
||||||
</buildArgs>
|
</buildArgs>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import picocli.CommandLine.Spec;
|
|||||||
@Command(
|
@Command(
|
||||||
name = "barn",
|
name = "barn",
|
||||||
mixinStandardHelpOptions = true,
|
mixinStandardHelpOptions = true,
|
||||||
version = "barn 0.1.1",
|
version = "barn 0.1.2",
|
||||||
description = "Cross-platform job daemon for media processing",
|
description = "Cross-platform job daemon for media processing",
|
||||||
subcommands = {
|
subcommands = {
|
||||||
RunCommand.class,
|
RunCommand.class,
|
||||||
|
|||||||
@@ -113,16 +113,7 @@ public class ServiceRestartCommand extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int startService(Path effectiveBarnDir) throws IOException {
|
private int startService(Path effectiveBarnDir) throws IOException {
|
||||||
String javaHome = System.getProperty("java.home");
|
ProcessBuilder pb = buildDaemonCommand(effectiveBarnDir);
|
||||||
String classPath = System.getProperty("java.class.path");
|
|
||||||
|
|
||||||
ProcessBuilder pb = new ProcessBuilder(
|
|
||||||
Path.of(javaHome, "bin", "java").toString(),
|
|
||||||
"-cp", classPath,
|
|
||||||
"com.samsonmedia.barn.Main",
|
|
||||||
"service", "start", "--foreground",
|
|
||||||
"--barn-dir", effectiveBarnDir.toString()
|
|
||||||
);
|
|
||||||
|
|
||||||
if (globalOptions != null && globalOptions.getConfigPath().isPresent()) {
|
if (globalOptions != null && globalOptions.getConfigPath().isPresent()) {
|
||||||
pb.command().add("--config");
|
pb.command().add("--config");
|
||||||
@@ -162,4 +153,33 @@ public class ServiceRestartCommand extends BaseCommand {
|
|||||||
}
|
}
|
||||||
return ConfigDefaults.getDefaultBaseDir();
|
return ConfigDefaults.getDefaultBaseDir();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ProcessBuilder buildDaemonCommand(Path effectiveBarnDir) {
|
||||||
|
// Check if running as a native image
|
||||||
|
if (isNativeImage()) {
|
||||||
|
// In native image, re-exec the current executable
|
||||||
|
String executable = ProcessHandle.current().info().command().orElse("barn");
|
||||||
|
return new ProcessBuilder(
|
||||||
|
executable,
|
||||||
|
"service", "start", "--foreground",
|
||||||
|
"--barn-dir", effectiveBarnDir.toString()
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// Running in JVM, use java command
|
||||||
|
String javaHome = System.getProperty("java.home");
|
||||||
|
String classPath = System.getProperty("java.class.path");
|
||||||
|
return new ProcessBuilder(
|
||||||
|
Path.of(javaHome, "bin", "java").toString(),
|
||||||
|
"-cp", classPath,
|
||||||
|
"com.samsonmedia.barn.Main",
|
||||||
|
"service", "start", "--foreground",
|
||||||
|
"--barn-dir", effectiveBarnDir.toString()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isNativeImage() {
|
||||||
|
// GraalVM sets this property when running as native image
|
||||||
|
return System.getProperty("org.graalvm.nativeimage.imagecode") != null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -99,18 +99,9 @@ public class ServiceStartCommand extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int startDaemon(Path effectiveBarnDir) throws IOException {
|
private int startDaemon(Path effectiveBarnDir) throws IOException {
|
||||||
// For daemonizing, we re-exec with --foreground and nohup
|
// For daemonizing, we re-exec with --foreground
|
||||||
// This is a simplified approach; production would use proper daemon techniques
|
// This is a simplified approach; production would use proper daemon techniques
|
||||||
String javaHome = System.getProperty("java.home");
|
ProcessBuilder pb = buildDaemonCommand(effectiveBarnDir);
|
||||||
String classPath = System.getProperty("java.class.path");
|
|
||||||
|
|
||||||
ProcessBuilder pb = new ProcessBuilder(
|
|
||||||
Path.of(javaHome, "bin", "java").toString(),
|
|
||||||
"-cp", classPath,
|
|
||||||
"com.samsonmedia.barn.Main",
|
|
||||||
"service", "start", "--foreground",
|
|
||||||
"--barn-dir", effectiveBarnDir.toString()
|
|
||||||
);
|
|
||||||
|
|
||||||
if (globalOptions != null && globalOptions.getConfigPath().isPresent()) {
|
if (globalOptions != null && globalOptions.getConfigPath().isPresent()) {
|
||||||
pb.command().add("--config");
|
pb.command().add("--config");
|
||||||
@@ -186,4 +177,33 @@ public class ServiceStartCommand extends BaseCommand {
|
|||||||
}
|
}
|
||||||
return ConfigDefaults.getDefaultBaseDir();
|
return ConfigDefaults.getDefaultBaseDir();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ProcessBuilder buildDaemonCommand(Path effectiveBarnDir) {
|
||||||
|
// Check if running as a native image
|
||||||
|
if (isNativeImage()) {
|
||||||
|
// In native image, re-exec the current executable
|
||||||
|
String executable = ProcessHandle.current().info().command().orElse("barn");
|
||||||
|
return new ProcessBuilder(
|
||||||
|
executable,
|
||||||
|
"service", "start", "--foreground",
|
||||||
|
"--barn-dir", effectiveBarnDir.toString()
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// Running in JVM, use java command
|
||||||
|
String javaHome = System.getProperty("java.home");
|
||||||
|
String classPath = System.getProperty("java.class.path");
|
||||||
|
return new ProcessBuilder(
|
||||||
|
Path.of(javaHome, "bin", "java").toString(),
|
||||||
|
"-cp", classPath,
|
||||||
|
"com.samsonmedia.barn.Main",
|
||||||
|
"service", "start", "--foreground",
|
||||||
|
"--barn-dir", effectiveBarnDir.toString()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isNativeImage() {
|
||||||
|
// GraalVM sets this property when running as native image
|
||||||
|
return System.getProperty("org.graalvm.nativeimage.imagecode") != null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,187 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.ipc.IpcMessage",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.ipc.IpcRequest$RunJob",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.ipc.IpcRequest$GetStatus",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.ipc.IpcRequest$GetJob",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.ipc.IpcRequest$KillJob",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.ipc.IpcRequest$CleanJobs",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.ipc.IpcRequest$GetServiceStatus",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.ipc.IpcRequest$Shutdown",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.ipc.IpcRequest$Reload",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.ipc.IpcResponse$Ok",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.ipc.IpcResponse$Error",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.jobs.Job",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.jobs.JobManifest",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.state.JobState",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.execution.ResourceUsage",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.config.Config",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.config.ServiceConfig",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.config.StorageConfig",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.config.JobsConfig",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.samsonmedia.barn.config.CleanupConfig",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true,
|
||||||
|
"allDeclaredMethods": true,
|
||||||
|
"allPublicMethods": true,
|
||||||
|
"allDeclaredFields": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "java.util.LinkedHashMap",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "java.util.HashMap",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "java.util.ArrayList",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "java.util.ImmutableCollections$ListN",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "java.util.ImmutableCollections$List12",
|
||||||
|
"allDeclaredConstructors": true,
|
||||||
|
"allPublicConstructors": true
|
||||||
|
}
|
||||||
|
]
|
||||||
Reference in new issue
Block a user