feat(resources): implement DatabaseResource generic type with connection string support #5446

Open
opened 2026-04-09 06:52:11 +00:00 by HAL9000 · 1 comment
Owner

Background

Part of Epic #5176 (Extended Resource Types — Cloud Infrastructure, Database & Virtual Resources). Adds a generic DatabaseResource type that supports any database via connection strings, enabling actors to interact with databases as first-class resources.

Expected Behavior

  • DatabaseResource type with connection_string, database_type (postgres, mysql, sqlite, etc.), and schema fields
  • physical: bool = True per spec
  • DatabaseResourceHandler with CRUD operations (connect, query, checkpoint)
  • Support for connection string interpolation from environment variables

Subtasks

  • Implement DatabaseResource model with connection_string, database_type, schema fields
  • Implement DatabaseResourceHandler with connect, query, and checkpoint methods
  • Register DatabaseResource in the resource type registry
  • Add environment variable interpolation for connection strings
  • Write Behave unit tests for DatabaseResource

Definition of Done

  • DatabaseResource type functional with connection string support
  • DatabaseResourceHandler implements all required CRUD operations
  • Environment variable interpolation works for connection strings
  • All nox stages pass
  • Coverage >= 97%

Metadata

  • Branch: feat/v3.6.0/extended-resource-types
  • Commit Message: feat(resources): implement DatabaseResource generic type with connection string support
  • Milestone: v3.6.0
  • Parent Epic: #5176
  • Depends on: #5258 (resource_kind → physical boolean fix must be done first)

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planner

## Background Part of Epic #5176 (Extended Resource Types — Cloud Infrastructure, Database & Virtual Resources). Adds a generic `DatabaseResource` type that supports any database via connection strings, enabling actors to interact with databases as first-class resources. ## Expected Behavior - `DatabaseResource` type with `connection_string`, `database_type` (postgres, mysql, sqlite, etc.), and `schema` fields - `physical: bool = True` per spec - `DatabaseResourceHandler` with CRUD operations (connect, query, checkpoint) - Support for connection string interpolation from environment variables ## Subtasks - [ ] Implement `DatabaseResource` model with connection_string, database_type, schema fields - [ ] Implement `DatabaseResourceHandler` with connect, query, and checkpoint methods - [ ] Register `DatabaseResource` in the resource type registry - [ ] Add environment variable interpolation for connection strings - [ ] Write Behave unit tests for DatabaseResource ## Definition of Done - [ ] `DatabaseResource` type functional with connection string support - [ ] `DatabaseResourceHandler` implements all required CRUD operations - [ ] Environment variable interpolation works for connection strings - [ ] All nox stages pass - [ ] Coverage >= 97% ## Metadata - **Branch**: `feat/v3.6.0/extended-resource-types` - **Commit Message**: `feat(resources): implement DatabaseResource generic type with connection string support` - **Milestone**: v3.6.0 - **Parent Epic**: #5176 - **Depends on**: #5258 (resource_kind → physical boolean fix must be done first) --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
HAL9000 added this to the v3.6.0 milestone 2026-04-09 06:54:16 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#5446
No description provided.