Skip to content

Conversation

@cstyan
Copy link
Contributor

@cstyan cstyan commented Dec 12, 2025

Used tasks to help out with this one, as I'm not super familiar with the template build and validation process yet.

The changes here introduce a deployment wide minimum agent metadata interval via CLI flag/env var. This is then applied in a strict way to new templates/new builds of existing templates, such that the template build will fail if it has a metadata interval does not comply with the minimum set for the coderd config value. Additionally, workspaces from existing template versions will have their agent metadata intervals "silently" upgraded (we log the upgrade but don't fail the workspace build) to comply with the config value.

This should allow coder deployment admins more control over deamplifying the volume of UpdateWorkspaceAgentMetadata db calls, and the associated pg_notify calls that go to the Workspace UI page, which is particularly relevant in larger organizations with high workspace counts/more metadata per agent.

Logging of the upgrade for a workspace using an existing template verison.
Screenshot 2025-12-12 at 1 07 13 PM

The failure message for a new template build that contains an invalid agent metdata interval value.
Screenshot 2025-12-12 at 12 58 42 PM

For the workspace built from an existing template, I also manually verified that the 60s upgraded interval value was being respected by using a timer to track changes in values shown on the UI page.

@github-actions
Copy link

github-actions bot commented Dec 12, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@cstyan cstyan force-pushed the callum/min-metadata-interval branch from fac183f to 140768f Compare December 13, 2025 00:51
@cstyan cstyan changed the title feat: Add deployment-wide agent metadata minimum interval enforcement feat: add deployment-wide agent metadata minimum interval enforcement Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants