Add public, tier, node fields to ServiceDef
RouteDef gains Public field (bool) for edge routing. ServiceDef gains Tier field. Node validation relaxed: defaults to tier=worker when both node and tier are empty (v2 compatibility). ToProto/FromProto updated to round-trip all new fields. Without this, public=true in TOML was silently dropped and edge routing never triggered. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -119,14 +119,8 @@ func TestValidation(t *testing.T) {
|
||||
},
|
||||
wantErr: "service name is required",
|
||||
},
|
||||
{
|
||||
name: "missing node",
|
||||
def: &ServiceDef{
|
||||
Name: "svc",
|
||||
Components: []ComponentDef{{Name: "api", Image: "img:v1"}},
|
||||
},
|
||||
wantErr: "service node is required",
|
||||
},
|
||||
// v2: missing node no longer errors — defaults to tier=worker.
|
||||
// Tested separately in TestValidationNodeTierDefault.
|
||||
{
|
||||
name: "empty components",
|
||||
def: &ServiceDef{
|
||||
|
||||
Reference in New Issue
Block a user