feat(resource): migrate postgres, mysql, and sqlite to inherit from database-relational #2036

Open
opened 2026-04-03 03:05:20 +00:00 by freemo · 3 comments
Owner

Metadata

  • Branch: feat/v360/db-relational-inheritance
  • Commit Message: feat(resource): migrate postgres, mysql, and sqlite to inherit database-relational
  • Milestone: v3.6.0
  • Parent Epic: #1020

Background

With the abstract database and database-relational base types defined (see #2035), the existing relational database resource types (postgres, mysql, sqlite) must be updated to inherit from database-relational instead of being flat top-level types. This preserves backward compatibility — existing resources with type postgres, mysql, or sqlite continue to work.

Expected Behavior

  • postgres resource type inherits from database-relational
  • mysql resource type inherits from database-relational
  • sqlite resource type inherits from database-relational
  • Existing resources of these types are not broken (backward-compatible migration)
  • All three types still pass ResourceTypeSpec.from_config() validation
  • Inheritance chain: postgresdatabase-relationaldatabase (depth = 3, within ADR-042 limit)

Acceptance Criteria

  • postgres type config updated to inherit database-relational
  • mysql type config updated to inherit database-relational
  • sqlite type config updated to inherit database-relational
  • Existing resources with these types still load and resolve correctly
  • All three types pass ResourceTypeSpec.from_config() validation
  • Inheritance chain depth ≤ 5 levels (ADR-042)
  • Behave BDD unit tests updated/added for the new inheritance chains
  • nox passes with coverage ≥ 97%

Dependencies

  • Blocked by: #2035 (abstract base types must exist first)
  • Blocks: #(DatabaseResourceHandler polymorphic resolution issue)

Subtasks

  • Update postgres type config to set parent to database-relational
  • Update mysql type config to set parent to database-relational
  • Update sqlite type config to set parent to database-relational
  • Verify backward compatibility: existing resource fixtures still resolve
  • Update Behave feature tests to assert new inheritance chains
  • Run nox and confirm all stages pass

Definition of Done

  • All subtasks completed
  • Tests written and passing
  • All nox stages pass
  • Coverage ≥ 97%

Automated by CleverAgents Bot
Supervisor: Unknown | Agent: ca-epic-planner

## Metadata - **Branch**: `feat/v360/db-relational-inheritance` - **Commit Message**: `feat(resource): migrate postgres, mysql, and sqlite to inherit database-relational` - **Milestone**: v3.6.0 - **Parent Epic**: #1020 ## Background With the abstract `database` and `database-relational` base types defined (see #2035), the existing relational database resource types (`postgres`, `mysql`, `sqlite`) must be updated to inherit from `database-relational` instead of being flat top-level types. This preserves backward compatibility — existing resources with type `postgres`, `mysql`, or `sqlite` continue to work. ## Expected Behavior - `postgres` resource type inherits from `database-relational` - `mysql` resource type inherits from `database-relational` - `sqlite` resource type inherits from `database-relational` - Existing resources of these types are not broken (backward-compatible migration) - All three types still pass `ResourceTypeSpec.from_config()` validation - Inheritance chain: `postgres` → `database-relational` → `database` (depth = 3, within ADR-042 limit) ## Acceptance Criteria - [ ] `postgres` type config updated to inherit `database-relational` - [ ] `mysql` type config updated to inherit `database-relational` - [ ] `sqlite` type config updated to inherit `database-relational` - [ ] Existing resources with these types still load and resolve correctly - [ ] All three types pass `ResourceTypeSpec.from_config()` validation - [ ] Inheritance chain depth ≤ 5 levels (ADR-042) - [ ] Behave BDD unit tests updated/added for the new inheritance chains - [ ] `nox` passes with coverage ≥ 97% ## Dependencies - Blocked by: #2035 (abstract base types must exist first) - Blocks: #(DatabaseResourceHandler polymorphic resolution issue) ## Subtasks - [ ] Update `postgres` type config to set parent to `database-relational` - [ ] Update `mysql` type config to set parent to `database-relational` - [ ] Update `sqlite` type config to set parent to `database-relational` - [ ] Verify backward compatibility: existing resource fixtures still resolve - [ ] Update Behave feature tests to assert new inheritance chains - [ ] Run `nox` and confirm all stages pass ## Definition of Done - [ ] All subtasks completed - [ ] Tests written and passing - [ ] All nox stages pass - [ ] Coverage ≥ 97% --- **Automated by CleverAgents Bot** Supervisor: Unknown | Agent: ca-epic-planner
freemo added this to the v3.6.0 milestone 2026-04-03 03:21:26 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium (confirmed)
  • Milestone: v3.6.0 (confirmed — database resource hierarchy)
  • MoSCoW: Should Have — Part of the database resource hierarchy chain. Migrating postgres, mysql, sqlite to inherit from database-relational is required for the polymorphic handler resolution (#2039).
  • Parent Epic: #1020 (confirmed correct)
  • Dependency: Blocked by #2035

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium (confirmed) - **Milestone**: v3.6.0 (confirmed — database resource hierarchy) - **MoSCoW**: Should Have — Part of the database resource hierarchy chain. Migrating postgres, mysql, sqlite to inherit from `database-relational` is required for the polymorphic handler resolution (#2039). - **Parent Epic**: #1020 (confirmed correct) - **Dependency**: Blocked by #2035 --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium
  • Milestone: v3.6.0
  • MoSCoW: Should Have — already correctly labeled; migrating relational DB resources to the new hierarchy
  • Parent Epic: #1020 (Database resource hierarchy restructuring)

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium - **Milestone**: v3.6.0 - **MoSCoW**: Should Have — already correctly labeled; migrating relational DB resources to the new hierarchy - **Parent Epic**: #1020 (Database resource hierarchy restructuring) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium (unchanged)
  • Milestone: v3.6.0 (already assigned)
  • MoSCoW: Should Have — Migrating postgres, mysql, and sqlite to inherit from database-relational is a key part of the database hierarchy restructuring. Depends on #2035 (base type definitions).
  • Parent Epic: #1020 (Database resource hierarchy restructuring)

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified ✅ - **Priority**: Medium (unchanged) - **Milestone**: v3.6.0 (already assigned) - **MoSCoW**: Should Have — Migrating postgres, mysql, and sqlite to inherit from `database-relational` is a key part of the database hierarchy restructuring. Depends on #2035 (base type definitions). - **Parent Epic**: #1020 (Database resource hierarchy restructuring) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo removed this from the v3.6.0 milestone 2026-04-07 01:31:13 +00:00
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#2036
No description provided.