Skip to content

feat(memory-server): switch all reads to external_key/source_type#251

Merged
Hyperkid123 merged 1 commit into
OpenShift-Fleet:masterfrom
Hyperkid123:feat/RHCLOUD-48378
Jun 17, 2026
Merged

feat(memory-server): switch all reads to external_key/source_type#251
Hyperkid123 merged 1 commit into
OpenShift-Fleet:masterfrom
Hyperkid123:feat/RHCLOUD-48378

Conversation

@Hyperkid123

@Hyperkid123 Hyperkid123 commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stage 3 of the 5-stage zero-downtime migration (RHCLOUD-48378).

Switches all read paths (WHERE, JOIN, GROUP BY) from jira_key to external_key/source_type. Stage 2 (dual-write, PR #249) guarantees external_key = jira_key for all rows, so this is a safe cutover.

Changes

  • MCP tools (task_get, task_update, task_remove, slack_notify): Accept both external_key+source_type (preferred) and jira_key (backward compat fallback)
  • REST API (api.py): Task delete/unarchive, slack notification lookup, and all 6 analytics queries switched to external_key columns
  • Response helpers: _task(), _cycle(), _memory() now include external_key, source_type, source_url, artifacts alongside existing jira_key
  • Dashboard types (types.ts): Additive optional fields on Task, Memory, CycleEntry, TicketEntry
  • 14 new tests (test_read_switchover.py): Verify dual-lookup, fallback, analytics, slack cooldown, and response field coverage

Backward compatibility

  • All existing callers using jira_key continue to work unchanged
  • API responses include BOTH old (jira_key) and new (external_key) fields
  • URL routes unchanged (route param changes deferred to Stage 4/5)

Test plan

  • All 67 tests pass (python -m pytest tests/ -v)
  • Dashboard builds clean (npm run build)
  • Deploy to stage and verify /api/tasks, /api/analytics, /api/costs responses include new fields

🤖 Generated with Claude Code

RHCLOUD-48378

Stage 3 of the zero-downtime migration. All WHERE clauses, JOINs,
and GROUP BYs now use external_key/source_type instead of jira_key.

MCP tools (task_get, task_update, task_remove, slack_notify) accept
both external_key+source_type (preferred) and jira_key (fallback).
REST API endpoints (delete, unarchive, analytics, slack lookup) use
external_key columns. Response helpers include new fields alongside
existing jira_key for backward compatibility.

Dashboard types updated with optional new fields. 14 new tests
verify the read switchover.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Hyperkid123 Hyperkid123 merged commit 1db57ea into OpenShift-Fleet:master Jun 17, 2026
6 checks passed
@Hyperkid123 Hyperkid123 deleted the feat/RHCLOUD-48378 branch June 17, 2026 10:25
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.

1 participant