TEST-INFRA: [ci-pipeline-design] Cache the Template Database to Speed Up Tests #3648

Open
opened 2026-04-05 21:05:08 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: task/ci-cache-template-db
  • Commit Message: perf(nox): cache template database to reduce CI test execution time
  • Milestone: (backlog — see note below)
  • Parent Epic: #1678

Description

The _create_template_db function in noxfile.py generates a template database for each test run. This process can be time-consuming, especially in the unit_tests and integration_tests sessions.

This task is to cache the template database to avoid regenerating it on every CI run. This will speed up the test execution and reduce the overall CI time.

Subtasks

  • Investigate the best way to cache the template database in the CI environment.
  • Modify the _create_template_db function to use the cached database if it exists.
  • Update the CI configuration to cache the template database between CI runs.
  • Tests: Verify cached DB is invalidated correctly when schema changes.
  • Run nox (all default sessions), fix any errors.
  • Verify coverage >= 97% via nox -s coverage_report.

Definition of Done

This issue is complete when:

  • The template database is cached between CI runs.
  • The test execution time is significantly reduced.
  • The changes are documented in the project's documentation.
  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.

Backlog note: This issue was discovered during autonomous operation
on milestone v3.2.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


Automated by CleverAgents Bot
Supervisor: Test Infrastructure | Agent: ca-new-issue-creator

## Metadata - **Branch**: `task/ci-cache-template-db` - **Commit Message**: `perf(nox): cache template database to reduce CI test execution time` - **Milestone**: *(backlog — see note below)* - **Parent Epic**: #1678 ## Description The `_create_template_db` function in `noxfile.py` generates a template database for each test run. This process can be time-consuming, especially in the `unit_tests` and `integration_tests` sessions. This task is to cache the template database to avoid regenerating it on every CI run. This will speed up the test execution and reduce the overall CI time. ## Subtasks - [ ] Investigate the best way to cache the template database in the CI environment. - [ ] Modify the `_create_template_db` function to use the cached database if it exists. - [ ] Update the CI configuration to cache the template database between CI runs. - [ ] Tests: Verify cached DB is invalidated correctly when schema changes. - [ ] Run `nox` (all default sessions), fix any errors. - [ ] Verify coverage >= 97% via `nox -s coverage_report`. ## Definition of Done This issue is complete when: - [ ] The template database is cached between CI runs. - [ ] The test execution time is significantly reduced. - [ ] The changes are documented in the project's documentation. - [ ] All subtasks above are completed and checked off. - [ ] A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - [ ] The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - [ ] The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage >= 97%. > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.2.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 21:07:12 +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#3648
No description provided.