Skip to content
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
2 changes: 1 addition & 1 deletion cli/commands/server_install_docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func ServerInstallDocker(ctx *Context, opts struct {
ClusterName string `long:"cluster-name" description:"Cluster name for cloud registration"`
CloudURL string `short:"u" long:"url" description:"Cloud URL for registration" default:"https://miren.cloud"`
Tags map[string]string `short:"t" long:"tag" description:"Tags for the cluster (key:value)"`
Labs []string `short:"l" long:"labs" description:"Miren Labs features to enable (e.g. adminapi). Prefix with - to disable."`
Labs []string `short:"l" long:"labs" description:"Miren Labs features to enable (e.g. distributedrunners). Prefix with - to disable."`
}) error {
if opts.ClusterName == "" {
opts.ClusterName = opts.Name
Expand Down
4 changes: 1 addition & 3 deletions components/coordinate/coordinate.go
Original file line number Diff line number Diff line change
Expand Up @@ -1149,9 +1149,7 @@ func (c *Coordinator) Start(ctx context.Context) error {
c.hs = httpingress.NewServer(ctx, c.Log, ingressConfig, loopback, aa, c.HTTP, c.LogWriter)

adminServer := admin.NewServer(c.Log, ec, c.hs, c.LogWriter)
if labs.AdminAPI() {
server.ExposeValue("dev.miren.runtime/admin", admin_v1alpha.AdaptAdmin(adminServer))
}
server.ExposeValue("dev.miren.runtime/admin", admin_v1alpha.AdaptAdmin(adminServer))

runnerReg := runnerserver.NewRegistrationServer(runnerserver.RegistrationServerConfig{
Log: c.Log,
Expand Down
3 changes: 1 addition & 2 deletions controllers/deployment/launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"miren.dev/runtime/pkg/entity"
"miren.dev/runtime/pkg/entity/types"
"miren.dev/runtime/pkg/idgen"
"miren.dev/runtime/pkg/labs"
)

var launcherTracer = otel.Tracer("miren.dev/runtime/deployment/launcher")
Expand Down Expand Up @@ -672,7 +671,7 @@ func (l *Launcher) buildSandboxSpec(
if portEnvValue > 0 {
appCont.Env = append(appCont.Env, fmt.Sprintf("PORT=%d", portEnvValue))
}
if labs.AdminAPI() && ver.AdminToken != "" {
if ver.AdminToken != "" {
appCont.Env = append(appCont.Env, "ADMIN_TOKEN="+ver.AdminToken)
}

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/command/server-docker-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ miren server docker install [flags]
- `--host-network` — Use host networking (ignores port mappings)
- `--http-port` — HTTP port mapping (default: `80`)
- `--image, -i` — Docker image to use (default: `oci.miren.cloud/miren:latest`)
- `--labs, -l` — Miren Labs features to enable (e.g. adminapi). Prefix with - to disable.
- `--labs, -l` — Miren Labs features to enable (e.g. distributedrunners). Prefix with - to disable.
- `--name, -n` — Container name
- `--url, -u` — Cloud URL for registration (default: `https://miren.cloud`)
- `--without-cloud` — Skip cloud registration setup
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/labs.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ Labs features are controlled via the `--labs` flag or `MIREN_LABS` environment v
<CliCommand context="server">
```miren
# Enable a single labs feature
miren server --labs adminapi
miren server --labs distributedrunners

# Enable multiple features
miren server --labs adminapi --labs distributedrunners
miren server --labs distributedrunners --labs globalrouter

# Via environment variable
MIREN_LABS=adminapi miren server
MIREN_LABS=distributedrunners miren server

# Multiple features via environment variable (comma-separated)
MIREN_LABS=adminapi,distributedrunners miren server
MIREN_LABS=distributedrunners,globalrouter miren server
```
</CliCommand>

Expand Down
5 changes: 0 additions & 5 deletions pkg/labs/features.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ features:
description: Schedule jobs across multiple runner nodes
default: false

- name: adminapi
predicate: AdminAPI
description: Enable the admin API for application management functions
default: false

- name: sagas
predicate: Sagas
description: Use saga-based crash-recoverable workflows for sandbox lifecycle
Expand Down
10 changes: 0 additions & 10 deletions pkg/labs/labs.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions pkg/labs/labs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ func TestDisableFeatureWithPrefix(t *testing.T) {
func TestCaseInsensitiveFeatureNames(t *testing.T) {
Reset()

Init(nil, []string{"GlobalRouter", "ADMINAPI"})
Init(nil, []string{"GlobalRouter", "DISTRIBUTEDRUNNERS"})

if !GlobalRouter() {
t.Error("GlobalRouter should be enabled (case-insensitive)")
}
if !AdminAPI() {
t.Error("AdminAPI should be enabled (case-insensitive)")
if !DistributedRunners() {
t.Error("DistributedRunners should be enabled (case-insensitive)")
}
}

Expand Down Expand Up @@ -73,16 +73,16 @@ func TestAllKeywordEnablesAllFeatures(t *testing.T) {
func TestAllKeywordWithExclusion(t *testing.T) {
Reset()

Init(nil, []string{"all", "-adminapi"})
Init(nil, []string{"all", "-distributedrunners"})

for _, name := range AllFeatures() {
if name == FeatureAdminAPI {
if name == FeatureDistributedRunners {
if IsEnabled(name) {
t.Error("AdminAPI should be disabled after 'all,-adminapi'")
t.Error("DistributedRunners should be disabled after 'all,-distributedrunners'")
}
} else {
if !IsEnabled(name) {
t.Errorf("Feature %q should be enabled after 'all,-adminapi'", name)
t.Errorf("Feature %q should be enabled after 'all,-distributedrunners'", name)
}
}
}
Expand All @@ -91,7 +91,7 @@ func TestAllKeywordWithExclusion(t *testing.T) {
func TestNegativeAllDisablesAll(t *testing.T) {
Reset()

Init(nil, []string{"globalrouter", "adminapi", "-all"})
Init(nil, []string{"globalrouter", "distributedrunners", "-all"})

for _, name := range AllFeatures() {
if IsEnabled(name) {
Expand Down
Loading