fix(multiplayer): propagate allocated playlist

This commit is contained in:
Josh Creek
2026-09-01 17:00:37 +01:00
parent 8bd1455a2c
commit 9ae01ecc5a
8 changed files with 24 additions and 6 deletions
+5 -1
View File
@@ -59,10 +59,14 @@ func (w Worker) RunOnce(ctx context.Context) (bool, error) {
// template. They are derived only from the durable match plan, never client
// input or mutable worker configuration.
func AllocationLabels(request domain.AllocationRequest) map[string]string {
return map[string]string{
labels := map[string]string{
"cosmic-clash.io/region": request.Region,
"cosmic-clash.io/build": request.Build,
"cosmic-clash.io/protocol": strconv.Itoa(request.Protocol),
"cosmic-clash.io/transport": request.Transport,
}
if request.Playlist != "" {
labels["cosmic-clash.io/playlist"] = string(request.Playlist)
}
return labels
}