Repository navigation
feat(operator): report observed application identity - #709
Conversation
Kubernetes pod statuses now carry each container's image and registry digest (from the container status imageID), and observed resource samples list the distinct images their pods run. Both fields are optional and omitted when empty, so existing readers are unaffected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remote Operator installations now report the application release they find on every permission tier. Before, only the `observe` tier reported it, so an Operator installed with `diagnostics` or `remediation` permission sent no application version at all. Raw inventory collection still requires `observe`. The sync payload gains an optional `application` report with the Helm chart from the workloads' `helm.sh/chart` label and each running container image with its digest. The Manager forwards it to the deployment store through `ReconcileInput::application()`. Older Managers ignore the field, and the Operator works unchanged against them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d19375a49a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Build the application report from this sync's observe pass instead of inventory kept from earlier passes, so it cannot repeat old images. Add `complete` so readers know when a workload kind could not be listed and the report covers only part of the application. Require a full MAJOR.MINOR.PATCH version when splitting `helm.sh/chart`, so a dotted number inside a chart name is not taken as the version. The Kubernetes sync test now runs the real observe pass against a stub Kubernetes API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…operator-release-receipt
…port (ALIEN-972) Document the `POST /v1/sync` body as `AgentSyncRequest` again, the name the released clients use, instead of the internal `AgentSyncWireRequest`. Regenerate the Manager OpenAPI specs and the TypeScript client so `agentSync` can send `application` and resource samples carry container images. The client also picks up the Vault secret endpoints already in the spec. Generated with `pnpm run generate:manager-rust-sdk` and Speakeasy 1.680.11 (`generate-typescript-sdk.sh` steps; the pinned CLI rejects `--skip-versioning`, so the version bump it makes was reverted).
|
@greptileai review |
…operator-release-receipt # Conflicts: # crates/alien-cli/src/commands/operations/mod.rs
Summary
The Remote Operator now reports which application release is running in each deployment. This release is the customer's application, not the Operator image.
observepermission sent the version-onlycurrentRelease, so an Operator installed withdiagnosticsorremediationpermission sent no application version. The newOperatorConfig::reports_application_release()check covers all three tiers. Raw inventory collection still requiresobserve, so this does not change what the Operator is permitted to do.applicationfield on the/v1/syncpayload. It carries the Helm chart and the container images, with digests, that the Operator reads from the observed Kubernetes workloads. The report is built only from the current sync's observe pass, never from inventory kept from earlier passes:helm.sh/chartlabel. The version starts at the first hyphen followed by aMAJOR.MINOR.PATCHversion, and_is converted back to+. The chart is reported only when every labelled workload names the same chart.status.containerStatuses[]. Each entry is keyed by the workload's inventoryrawIdentityand the container name. The digest comes fromimageIDonly when it is arepo@sha256:<hex>reference. A baresha256:value is a local image ID, so it is omitted.completeisfalsewhen a workload kind could not be listed. In that case the chart and images cover only the workloads the Operator could read.containers(name, image, digest), and observed resource samples carry the distinctimagesof their pods. Both are optional and omitted when empty.applicationand forwards it to the deployment store throughReconcileInput::application(). The existinginto_parts()signature is unchanged, so current store implementations still compile.Compatibility
currentReleaseworks as before.Wire shape
source,completeandobservedAtare always present. The other fields are omitted when empty.Not included
This PR adds no ECS image reporting. The ECS Operator's task role cannot read the application's services or task definitions, and the installation does not identify which services belong to the application. Adding that needs new IAM grants and a way to select those services. On ECS, the Operator now reports the
OPERATOR_RELEASE_VERSIONversion incurrentRelease.Generated artifacts
pnpm run generate:manager-rust-sdk(Manager OpenAPI and the Rust SDK inputs)pnpm generateinpackages/core(zod schemas). The new types are exported frompackages/core/src/index.ts.client-sdks/manager/scripts/generate-typescript-sdk.sh. That CLI rejects the script's--skip-versioningflag, so the generator ran without it and the version bump it made (3.3.24) was reverted.agentSyncnow sendsapplication, and resource samples carryimages. The client also picks up the Vault secret endpoints that were already in the spec but missing from the client./v1/syncbody is documented asAgentSyncRequestagain (the name in the released clients) instead of the internalAgentSyncWireRequest, so regenerating does not rename the TypeScript request type.Validation
cargo nextest run -p alien-core -p alien-k8s-clients -p alien-observer -p alien-operator -p alien-manager -p alien-deployment --features alien-manager/openapi: 1224 passed, 1 skipped. This run was on the first head.cargo nextest run -p alien-core -p alien-operator -p alien-manager --lib --features alien-manager/openapi: 934 passed.imageIDfor multiple containers, with no digest for a local image ID.diagnosticsOperator sendscurrentRelease.version. This test fails with the oldobserve-only check.applicationJSON, with the digest parsed from the pod'simageID. Inventory saved from an earlier pass does not change the report.SyncInputserialized and then deserialized by the Manager request type.pnpm -C client-sdks/manager/typescript buildandnode --test client-sdks/manager/scripts/typescript-sdk.test.mjs(3 passed; the new test checks thatagentSyncRequestToJSONkeepsapplication).cargo nextest run -p alien-manager --features openapi --lib routes::sync(37 passed),cargo nextest run -p alien-operator(79 passed),cargo check -p alien-manager-api.cargo check --workspace --tests --features alien-manager/openapi,alien-bindings/platform-sdkandpnpm -C packages/core buildpass.