[Bug]: get actor-template -o yaml prints a ListActorTemplatesResponse envelope that create actor-template -f rejects

Open Beginner friendly
#1,642 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
Half a day
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go
Domain
cli

Research direction

Start with cmd/kubectl-ate/internal/printer/printer.go around lines 296-300 and cmd/kubectl-ate/internal/cmd/create_actor_template.go around lines 82-84. Reproduce the documented get -o yaml and create -f commands, then inspect the README and --help text for the expected round-trip. Done means YAML emitted by get actor-template can be accepted by create actor-template without the actorTemplates unknown-field error.

Written by the indexing model from the issue text.

Description

area/cli kind/bug kind/docs

kubectl ate get actor-template <name> -a <atespace> -o yaml prints the template wrapped in the ListActorTemplatesResponse envelope, i.e. under a top-level actorTemplates: list key.

kubectl ate create actor-template -f <manifest> parses its input as a bare ateapipb.ActorTemplate with strict protojson (unknown fields are an error). It therefore rejects exactly the document the get command just printed:

Error: failed to parse actor template manifest "template.yaml": proto: (line 1:2): unknown field "actorTemplates"

Both the README and the command's own --help text tell users that the -o yaml output can be fed back in, so the documented get -> edit -> re-apply round-trip does not work.

actor-template is the only noun in kubectl-ate that accepts -f, so it is the only noun where this round-trip is offered, and it is broken.

Verified at 58624ee8.

Dominant language
Go
Stars
2k
Forks
333
Avg merge
1d 23h
Merged PRs (30d)
275

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from agent-substrate/substrate

All issues in agent-substrate/substrate

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.