User request
E2E CI (agynio/e2e) is failing when creating/updating/importing an agent with a nickname.
Symptom
Terraform provider acceptance tests fail:
TestAccAgynAgent_update
TestAccAgynAgent_import
Error excerpt:
create agent: internal: set nickname: rpc error: code = Unauthenticated desc = identity not available: x-identity-id not found in metadata
Example failing run:
Root cause (analysis)
When CreateAgent includes a non-empty nickname, agents-service calls Identity service to set the nickname.
Identity service requires x-identity-id in outgoing gRPC metadata, but agents-service currently calls Identity using the incoming request context (ctx) without forwarding the identity metadata from incoming → outgoing.
As a result, Identity returns Unauthenticated and agent creation rolls back.
Specification / fix
In agents-service, for any Identity RPCs that require caller identity (e.g. SetNickname, RemoveNickname, etc.):
- Extract
x-identity-id from metadata.FromIncomingContext(ctx).
- Create an outgoing context that includes that header, e.g.
metadata.AppendToOutgoingContext(ctx, "x-identity-id", identityID).
- Use that outgoing context when calling the Identity client.
Acceptance criteria
User request
E2E CI (agynio/e2e) is failing when creating/updating/importing an agent with a nickname.
Symptom
Terraform provider acceptance tests fail:
TestAccAgynAgent_updateTestAccAgynAgent_importError excerpt:
Example failing run:
Root cause (analysis)
When
CreateAgentincludes a non-empty nickname, agents-service calls Identity service to set the nickname.Identity service requires
x-identity-idin outgoing gRPC metadata, but agents-service currently calls Identity using the incoming request context (ctx) without forwarding the identity metadata from incoming → outgoing.As a result, Identity returns
Unauthenticatedand agent creation rolls back.Specification / fix
In agents-service, for any Identity RPCs that require caller identity (e.g.
SetNickname,RemoveNickname, etc.):x-identity-idfrommetadata.FromIncomingContext(ctx).metadata.AppendToOutgoingContext(ctx, "x-identity-id", identityID).Acceptance criteria
nicknamesucceeds (noUnauthenticated).agynio/e2ego-terraform suite passes against latest bootstrap (unblocks PR test(e2e): use oidc login flows e2e#83).