Skip to content

feat(agent): add ParentId to agent manifest #17888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 19, 2025
Merged

Conversation

DanielleMaywood
Copy link
Contributor

@DanielleMaywood DanielleMaywood commented May 16, 2025

Closes coder/internal#648

This change introduces a new ParentId field to the agent's manifest. This will allow an agent to know if it is a child or not, as well as knowing who the owner is.

This is part of the Dev Container Agents RFC work

@DanielleMaywood DanielleMaywood changed the title feat(agent): add ParentId to agent manifest feat: add ParentId to agent manifest May 19, 2025
@DanielleMaywood DanielleMaywood changed the title feat: add ParentId to agent manifest feat(agent): add ParentId to agent manifest May 19, 2025
This change introduces a new `ParentId` field to the agent's manifest.
This will allow an agent to know if it is a child or not, as well as
knowing who the owner is.
@DanielleMaywood DanielleMaywood marked this pull request as ready for review May 19, 2025 09:17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also assert that parent is nil if not specified in the manifest? (Essentially the inverse of the test you added)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the original test to have the ParentId: null explicit in the expected struct 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent/proto/version.go defines its version as the same version as tailnet/proto so I think we need to add a comment in tailnet/proto/version.go and bump the minor version.

johnstcn
johnstcn previously approved these changes May 19, 2025
@johnstcn johnstcn dismissed their stale review May 19, 2025 10:47

tests

@@ -45,9 +45,13 @@ import (
// PushResourcesMonitoringUsage RPCs on the Agent API.
// - Added support for reporting connection events for auditing via the
// ReportConnection RPC on the Agent API.
//
// API v2.5:
// - Shipped in Coder v2.xx.x // TODO(DanielleMaywood): Update version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can make an educated guess at 2.23 :) but this is fine for now.

@DanielleMaywood DanielleMaywood merged commit 61f22a5 into main May 19, 2025
36 checks passed
@DanielleMaywood DanielleMaywood deleted the dm-agent-manifest branch May 19, 2025 15:09
@github-actions github-actions bot locked and limited conversation to collaborators May 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ParentId to agent manifest
2 participants