swarm-controller: move the forge concern into its own module
Refs #6897
This commit is contained in:
parent
ca16980a06
commit
a9df331469
1 changed files with 44 additions and 37 deletions
|
|
@ -387,7 +387,7 @@ drops it unanswered, which reads as a 504. `swarmctl agent agents-md get` and
|
|||
|
||||
The controller also keeps the forge objects that are one per swarm, not
|
||||
one per hive. It ensures them at start and every five minutes after
|
||||
(`swarm-controller/src/forge/objects.rs`):
|
||||
(`swarm-controller/src/git_forge/forge/objects.rs`):
|
||||
|
||||
- the orgs `agent-configs`, `internal` and `agents`, plus each mirror's
|
||||
owner org;
|
||||
|
|
@ -411,12 +411,12 @@ one per hive. It ensures them at start and every five minutes after
|
|||
|
||||
The config repos get the agent's icon too. When a build sets the agent's icon,
|
||||
the controller sets the avatar of `agent-configs/<agent>` from the PNG the
|
||||
builder rendered (`forge/repo_avatar.rs`), as the forge admin, who may edit any
|
||||
builder rendered (`git_forge/forge/repo_avatar.rs`), as the forge admin, who may edit any
|
||||
repo's avatar. A marker per repo (`forge-repo-avatar-<repo>`) holds the image's
|
||||
SHA-256, as for the service accounts below.
|
||||
|
||||
The swarm's own forge accounts (`builder`, `ci-metrics` and `review-classifier`)
|
||||
get an avatar too, from a separate pass in the controller (`forge/service_avatars.rs`).
|
||||
get an avatar too, from a separate pass in the controller (`git_forge/forge/service_avatars.rs`).
|
||||
Each has an icon in a hexagonal frame (`branding/service-<login>.svg`, rendered to a PNG
|
||||
in the assets package) and falls back to the hyperhive logo. Only an account can set its own
|
||||
avatar, so the pass mints a short-lived `write:user` token for it with the admin API, uploads
|
||||
|
|
@ -433,7 +433,7 @@ controller is down the objects stay as they are.
|
|||
|
||||
The controller gives each agent **read** on `internal/docs`. A `GrantDocsRead`
|
||||
node in the agent's create job adds it as a collaborator, unless it already holds read or more. A pass over the
|
||||
store's `hive-agent-*` roster (`forge/docs_grant.rs`, at start and every five
|
||||
store's `hive-agent-*` roster (`git_forge/forge/docs_grant.rs`, at start and every five
|
||||
minutes) adds any agent that isn't one, so an agent whose create-time grant failed
|
||||
gets it within five minutes. The pass only adds: a roster it can't read, a
|
||||
forge read that fails, or an `internal/docs` that doesn't exist (checked once per
|
||||
|
|
|
|||
Loading…
Reference in a new issue