Skip to content

ax-server accepts resource names that Substrate rejects (RFC 1123); failure surfaces asynchronously as ActorCreationFailed #370

Closed

Description

@zhoukuncheng

Summary

ax apply accepts any metadata.name. Names are only validated when the controller creates the Substrate ActorTemplate/Actor, which require an RFC 1123 label. A name with an uppercase letter is therefore accepted by ax-server, stored in Redis, and then fails asynchronously with a confusing ActorCreationFailed condition; the user has to run ax describe (or read controller logs) to learn that the name was the problem.

AX d8ed0fe.

Reproduction

apiVersion: ax.io/v1alpha1
kind: Task
metadata:
  name: Task-With-Caps
  atespace: default
spec:
  image: "localhost:5001/my-agent@sha256:..."
  command: ["sleep", "3600"]

ax apply -f task.yaml prints task.ax.io/Task-With-Caps created. Seconds later:

Ready  False  ActorCreationFailed  creating actor default/Task-With-Caps: rpc error: code = InvalidArgument desc = actor.metadata.name: Invalid value: "Task-With-Caps": a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-' ...

Because the controller also derives the template name as <task>-tmpl-<hash>, the same failure hits the template first and is swallowed as a WARN (see #366).

Expected

ax-server should reject the manifest at apply time with the same rule ([a-z0-9]([-a-z0-9]*[a-z0-9])?, max 63 chars), for Task, Gateway, Workspace and Model names alike.

Suggested fix

Add the check to the manifest validation in internal/server/server.go (one regexp shared by all four kinds) and a table test with a few invalid names.

Activity

  1. added a commit that references this issue on Sep 25, 2026
    46a5012
  2. added a commit that references this issue on Sep 25, 2026
    099f24a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions