Skip to content

fix: populate organization_id in Agent proto response #28

@rowan-stein

Description

@rowan-stein

Problem

The ListAgents (and GetAgent) RPCs return Agent messages with organization_id always empty. The field exists in the proto schema (organization_id = 10 on Agent message, added in api PR #67), and the value is stored in the DB and loaded into store.Agent.OrganizationID, but the server's toProtoAgent() converter in internal/server/converter.go never maps it to the proto field.

Impact

The agents-orchestrator's assembler validates agent.GetOrganizationId() != "" before creating workloads. Since it's always empty, the reconciler logs "agent organization id missing" and never starts any workloads.

Fix

In internal/server/converter.go, add OrganizationId: agent.OrganizationID.String() to the toProtoAgent() return struct.

Context

  • Proto field added in agynio/api PR #67
  • Stale TODO from commit bab4d8f — converter was never updated when the proto field was added in a6ce033
  • Blocks orchestrator E2E (PR #70 in agynio/agents-orchestrator)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions