Repository navigation
rename ateom -> ateworker - #2254
Conversation
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
cbdecb7 to
8964f28
Compare
8964f28 to
a6d3602
Compare
Tim Hockin (thockin)
left a comment
There was a problem hiding this comment.
TL;DR: the places where we just refer to the abstract idea of "a worker" should just say "worker". E.g. if someone could replace our baked-in ateworker with their own worker and the sentence would still make sense, "worker". "ateworker" should refer to specifically our main implementation(s).
But also, most of this is internal - comments etc. Focus on public facing stuff -- proto names and methods and the SPIFFE stuff.
| // on behalf of a particular actor. | ||
| // | ||
| // SPIFFE URI: spiffe://${trustdomain}/ateom-for-actor/${atespace}/${actor} | ||
| rpc MintAteomActorCertificate(MintAteomActorCertificateRequest) returns (MintAteomActorCertificateResponse); | ||
| // SPIFFE URI: spiffe://${trustdomain}/ateworker-for-actor/${atespace}/${actor} |
There was a problem hiding this comment.
This is a very consequential one - should SPIFFE say "ateworker" or "worker"? I think "worker".
| return &url.URL{ | ||
| Scheme: "spiffe", | ||
| Host: ActorSPIFFETrustDomain, | ||
| // TODO(identity): Prefix with "atunnel" to prevent | ||
| // confusion between atunnel and an actor pretending to be | ||
| // an atunnel. | ||
| Path: path.Join("ateom-for-actor", r.Atespace, r.Name), | ||
| Path: path.Join("ateworker-for-actor", r.Atespace, r.Name), |
There was a problem hiding this comment.
Taahir Ahmed (@ahmedtd) this is a decision that will stick for a long time?
Agree.
Yeah that makes sense, we can punt internal cleanups to later. |
|
I do think we should rename the internal packages to match and that's going to cause churn but we can do that separately from nailing down the user-visible renames. |
4702dca to
235c262
Compare
| // TODO(identity): Must be configurable per-install, so that each install can set it to a unique value. | ||
| Host: "substrate-actor.local", | ||
| Path: path.Join("ateom-for-actor", dbActor.GetMetadata().GetAtespace(), dbActor.GetMetadata().GetName()), | ||
| Path: path.Join("worker-for-actor", dbActor.GetMetadata().GetAtespace(), dbActor.GetMetadata().GetName()), |
There was a problem hiding this comment.
is worker a process?
I think its weird to call it "worker-for-actor". As the side that validates it, I want to make sure I know that this is a specific process on the worker..
There was a problem hiding this comment.
As the side that validates it, I want to make sure I know that this is a specific process on the worker..
There isn't one ... only the actors sandbox. The worker process overseeing those is multi-tenant.
There was a problem hiding this comment.
ate-worker [per worker pod] -> gvisor [per actor]
There was a problem hiding this comment.
if ate-worker is a specific pod, (and it is. cause I undersatnd you are only doing a rename) call it ate-worker-for-actor
There was a problem hiding this comment.
See #2254 (review), I think it's sort of an open architecture debate if you can bring your own worker implementation and get this cert or if we'd only allow it with our own implementation?
There was a problem hiding this comment.
We can of course rename things again, but #2254 (comment) was Tim's take to call this worker and not ateworker.
There was a problem hiding this comment.
If we had a worker which implemented all the right APIs but wasn't literally the ateworker binary we ship -- would we still issue a cert?
15fd4ff to
657a007
Compare
848ac0e to
a0c5e5d
Compare
ateom was named when it hosted one actor, workers now host many
the package name is part of every method name on the wire
AteomHerder, which ateapi calls to drive actors on a node, becomes Atelet
it runs whatever image the WorkerPool names
the worker's own leaf is now worker, the micro-VM guest's container parent is now /actor
- /var/lib/ate/ateoms/<uid> -> workers/<uid>, ateom.sock -> worker.sock - ateom-support.sock -> worker-support.sock - run-ateom and ateom-dir -> ate-base, ateom-capacity -> worker-capacity
(not the internal go package names, yet ...)
59550af to
4422ca5
Compare
63a17a9
|
#2700 handles the internal package cleanup, fixing all remaining |
Follow-up to agent-substrate#2254, renames the remaining internal/ateom* go packages. After this change there is no `ateom` left in the repo. 🫡 - Worker only packages move under `internal/ateworker`: register (the registration code, leaving `internal/ateworker` itself for the shared worker code), cgroup, pid1 (was ateominit), actornet (was ateomnet), phaselog, suspend, tunnel - Two packages go flat instead: `internal/workerstats`, which atelet also imports, and `internal/netns`, a generic named netns helper that atunnel's tests also use - The downward API file names atecontroller needs move to `internal/workercapacity`, so it doesn't import the worker registration code - `depguard` (`golangci-lint`) now fails any import of `internal/ateworker` outside `cmd/ateworker-*` and `internal/ateworker` - Drops an unused stopwatch package - Renames cmd/atelet's ateom* files The move commits are only `git mv`, imports and package names are fixed in a separate commit after each round of moves, to make it clear which changes are just file moves and which changes are import rewrites etc. We squash merge, so the intermediate commits don't need to build. This PR was AI assisted. I have reviewed the changes.
Breaking change
fixes #2065
renames ateom ahead of GA. this is breaking, atelet and the worker images need to be updated together.
per review, "worker" where any worker implementation fits and "ateworker" for ours.
the internal go packages (internal/ateom*) keep their names for now, that's a follow-up.
one commit per rename to make review easier.
tested with kind e2e (gVisor + micro-VM) on an earlier rebase, plus CI.
This PR was AI assisted. I have reviewed the changes.