refactor(server): extract shared runtime and implement service install/run in arbiter-server.exe #44

Open
CleverWild wants to merge 6 commits from win-service into main
Member
No description provided.
CleverWild added 1 commit 2026-04-02 16:31:28 +00:00
refactor(server): extract shared runtime and implement service install/run in arbiter-server.exe
Some checks failed
ci/woodpecker/pr/server-lint Pipeline failed
ci/woodpecker/pr/server-audit Pipeline was successful
ci/woodpecker/pr/server-vet Pipeline failed
ci/woodpecker/pr/server-test Pipeline was successful
2fb5bb3d84
Skipper requested changes 2026-04-02 18:57:31 +00:00
Dismissed
Skipper left a comment
Owner

plz clarify

plz clarify
@@ -0,0 +2,4 @@
use clap::{Args, Parser, Subcommand};
const DEFAULT_LISTEN_ADDR: &str = "127.0.0.1:50051";
Owner

there was a port hardcoded in arbiter-proto. use that instead

there was a port hardcoded in arbiter-proto. use that instead
CleverWild marked this conversation as resolved
@@ -0,0 +15,4 @@
#[derive(Debug, Subcommand)]
pub enum Command {
/// Run server in foreground mode.
Run(RunArgs),
Owner

does this run without specifying anything?
Meaning: it should run even if no command specified

does this run without specifying anything? Meaning: it should run even if no command specified
Author
Member

Yup. See Option in the struct above.

Yup. See `Option` in the struct above.
CleverWild marked this conversation as resolved
@@ -0,0 +25,4 @@
}
}
pub async fn run_server_until_shutdown<F>(config: RunConfig, shutdown: F) -> miette::Result<()>
Owner

I would put that in lib.rs instead

I would put that in lib.rs instead
CleverWild marked this conversation as resolved
@@ -0,0 +64,4 @@
addr: SocketAddr,
bootstrapper: &ActorRef<crate::actors::bootstrap::Bootstrapper>,
tls: &crate::context::tls::TlsManager,
) -> miette::Result<ArbiterUrl> {
Owner

why this small chunk is a separate function?

why this small chunk is a separate function?
Author
Member

The Eye of Sauron didn't notice this during the refactor.

The Eye of Sauron didn't notice this during the refactor.
CleverWild marked this conversation as resolved
@@ -0,0 +58,4 @@
name: OsString::from(SERVICE_NAME),
display_name: OsString::from(SERVICE_DISPLAY_NAME),
service_type: ServiceType::OWN_PROCESS,
start_type: ServiceStartType::OnDemand,
Owner

does this run service on pc boot?

does this run service on pc boot?
Author
Member

Nope. Wrong flag.

Nope. Wrong flag.
CleverWild marked this conversation as resolved
@@ -0,0 +207,4 @@
// because service-account and interactive-user access requirements are different in production.
let target = data_dir.as_os_str();
let status = Command::new("icacls")
Owner

clarify meaning of this in comment

clarify meaning of this in comment
CleverWild marked this conversation as resolved
CleverWild added 4 commits 2026-04-02 23:54:39 +00:00
docs(service): clarify ACL setup requirements for service and interactive user access
Some checks failed
ci/woodpecker/pr/server-lint Pipeline failed
ci/woodpecker/pr/server-audit Pipeline was successful
ci/woodpecker/pr/server-vet Pipeline failed
ci/woodpecker/pr/server-test Pipeline was successful
ci/woodpecker/pr/useragent-analyze Pipeline failed
64a07e0ed6
CleverWild requested review from Skipper 2026-04-02 23:54:42 +00:00
Skipper approved these changes 2026-04-03 16:30:34 +00:00
Skipper left a comment
Owner

Approved, but I will add macos part now

Approved, but I will add macos part now
Some checks failed
ci/woodpecker/pr/server-lint Pipeline failed
Required
Details
ci/woodpecker/pr/server-audit Pipeline was successful
Required
Details
ci/woodpecker/pr/server-vet Pipeline failed
ci/woodpecker/pr/server-test Pipeline was successful
Required
Details
ci/woodpecker/pr/useragent-analyze Pipeline failed
This pull request has changes conflicting with the target branch.
  • mise.lock
  • server/Cargo.lock
  • server/crates/arbiter-proto/src/lib.rs
  • server/crates/arbiter-server/Cargo.toml
  • server/crates/arbiter-server/src/main.rs
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin win-service:win-service
git checkout win-service
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MarketTakers/arbiter#44