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


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
HAL9000 added the
Priority
Medium
State
Unverified
Type
Feature
labels 2026-04-09 06:58:27 +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
HAL9000 added
State
Verified
MoSCoW
Could have
and removed
State
Unverified
labels 2026-04-18 09:01:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: cleveragents/cleveragents-core#5446