Skip to content

profile: move the ActorTemplate reference under ate - #593

Closed
rakyll wants to merge 6 commits into
mainfrom
ate
Closed

rakyll wants to merge 6 commits into
mainfrom
ate

Conversation

@rakyll

@rakyll rakyll commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Manifest shape is now

spec:
  profile:
    ateTemplate:
      name: base-tmpl
      atespace: my-atespace   # optional

One assumption to flag. You wrote ate_template, but every key the YAML codec emits is lowerCamelCase, so the manifest key is ateTemplate. A literal snake_case ate_template would need a json_name override in the proto and would be the only snake_case key in the API. I went with the consistent form. If you do want ate_template verbatim, say so and I'll add the override.

What changed

  • pkg/apis/v1alpha1/common.proto: field renamed. The ObjectRef type and the sandbox-contract comment are unchanged. Generated code refreshed.
  • Go callers use GetAteTemplate(), and test literals use AteTemplate:. Two test files were re-aligned by gofmt.
  • Validation and server errors now report spec.profile.ateTemplate.name, spec.profile.ateTemplate.atespace, and spec.profile.ateTemplate for the image/resources conflict.
  • docs/manifests.md examples and prose, plus the YAML round-trip fixture, use ateTemplate.

…teSpec

Replace Profile.ate_actor_template with Profile.ate, an ATETemplateSpec
holding the existing Substrate ActorTemplate name and an optional
atespace that defaults to the resource's own. The reconciler looks the
template up and binds the actor to it in that atespace; validation
requires ate.template and checks both names. TaskStatus keeps its
ate_actor_template field.
The field names an existing Substrate ActorTemplate, so call it that.
Manifests now use spec.profile.ate.actorTemplate.
Reverts f16f5b0; manifests use spec.profile.ate.template again.
The message references an existing Substrate ActorTemplate rather than
specifying one, so name it as a ref.
@rakyll rakyll changed the title profile: move the ActorTemplate reference under ate and add ATETemplateSpec profile: move the ActorTemplate reference under ate Nov 15, 2026
Replace ATETemplateRef with a generic ObjectRef {name, atespace} in
common.proto. Manifests now reference an existing Substrate ActorTemplate
as spec.profile.ate.name with an optional spec.profile.ate.atespace.
Profile.ate was too terse once the field became a generic ObjectRef: a
reader of the manifest could not tell what Substrate object the ref
pointed at. Rename it to ate_template so the key says what it is.

The manifest key follows the usual protojson camelCase, so an existing
Substrate ActorTemplate is now referenced as:

  spec:
    profile:
      ateTemplate:
        name: base-tmpl
        atespace: shared   # optional; defaults to the resource's atespace

Go callers use Profile.GetAteTemplate(). Validation and ax-server errors
report spec.profile.ateTemplate.name, spec.profile.ateTemplate.atespace,
and spec.profile.ateTemplate for the conflict with image/resources.
docs/manifests.md and the YAML round-trip fixture use the new key.
siyuanfoundation added a commit to siyuanfoundation/ax that referenced this pull request Nov 18, 2026
Based on google#593.
Fixes google#600

Introduce ObjectRef for Profile.ate_template and replace
TaskStatus.ate_actor_template (string) with ObjectRef ate_template so
task status carries both the ActorTemplate name and its atespace.

Co-authored-by: Jaana Dogan <[email protected]>
Signed-off-by: siyuanfoundation <[email protected]>
siyuanfoundation added a commit to siyuanfoundation/ax that referenced this pull request Nov 18, 2026
Based on google#593.
Fixes google#600

Introduce ObjectRef for Profile.ate_template and replace
TaskStatus.ate_actor_template (string) with ObjectRef ate_template so
task status carries both the ActorTemplate name and its atespace.

Co-authored-by: Jaana Dogan <[email protected]>
Signed-off-by: siyuanfoundation <[email protected]>
siyuanfoundation added a commit that referenced this pull request Nov 18, 2026
…642)

Based on #593.
Fixes #600

Introduce ObjectRef for Profile.ate_template and replace
TaskStatus.ate_actor_template (string) with ObjectRef ate_template so
task status carries both the ActorTemplate name and its atespace.

Signed-off-by: siyuanfoundation <[email protected]>
Co-authored-by: Jaana Dogan <[email protected]>
@siyuanfoundation

Copy link
Copy Markdown
Collaborator

changes merged in #642

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants