Skip to content

fastapi mcp#1507

Draft
shangyian wants to merge 3202 commits intoDataJunction:mainfrom
shangyian:pydantic_v2
Draft

fastapi mcp#1507
shangyian wants to merge 3202 commits intoDataJunction:mainfrom
shangyian:pydantic_v2

Conversation

@shangyian
Copy link
Copy Markdown
Collaborator

@shangyian shangyian commented Sep 24, 2025

Summary

This sets up an MCP server for DJ. It depends on #1509, which I'll rebase on top of once that's in.

Test Plan

  • PR has an associated issue: #
  • make check passes
  • make test shows 100% unit test coverage

Deployment Plan

shangyian and others added 16 commits September 1, 2025 17:16
* Add caching for node SQL

* Move system SQL over to use the query cache manager

* Move all final stage SQL builders to a single file for cleaner organization

* Add caching for various data endpoints

* Remove now unused QueryRequest logic

* Fix client with query service fixture
Co-authored-by: GitHub Actions Bot <>
* Add service account support

* Make service account expiration window configurable

* Clean up test user fixtures and fix tests

* Convert to principal kind enum to distinguish between users and service accounts

* Rename to created_by

* Add check where only users can create service accounts

* Add checks for service account when requesting token

* Add check for invalid service account creds

* Fix alembic revision
* Move the various node API CRUD calls to separate functions so that they can be reused elsewhere
* Move upserting reference dimension link to separate function
* Move create source API call to separate function
Co-authored-by: GitHub Actions Bot <>
…sed in (DataJunction#1492)

* Enable session context without request

* Background tasks should not have request-bound sessions or objects passed into them, so we pass along identifiers rather than sessions and ORM objects and use a session factory to ensure that the task is fully self-contained

* Handle materialization jobs run through background tasks and run directly via diff sessions
* Speed up the hard deletion of namespaces, along with cascading hard deletion of nodes

* Clean up hard delete response
* Speed up creating a node by pushing some tasks async

* Add further optimizations to AST

* Fix

* Fix test after background tasks override

* Update node.py
Co-authored-by: GitHub Actions Bot <>
…tion#1501)

When running client tests, print the missing coverage lines
Fix client tests to work with async pg connection
* Background tasks should not have request-bound sessions or objects passed into them, so we pass along identifiers rather than sessions and ORM objects and use a session factory to ensure that the task is fully self-contained

* Handle materialization jobs run through background tasks and run directly via diff sessions

* Add bulk deployment endpoint for a namespace that takes a set of node specifications
Add setup for upserting and change detection
Add check for dimension link dependencies and fix tests

* Save deployment state to database

* Configure a unique session per pytest-xdist worker to fix tests

* Add support for exporting and better operations management

* Add support for partitions

* Add attributes deployment

* Add test coverage for deploy

* Remove extraneous load options

* When hard-deleting, we should raise if a node doesn't exist

* Add broader test coverage for setting column properties, partitions, dimension links etc
@netlify
Copy link
Copy Markdown

netlify bot commented Sep 24, 2025

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit 4b4f5f1
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/68d52d88c28307000825f3c9

@shangyian shangyian changed the title Upgrade datajunction-server to pydantic v2 fastapi mcp Sep 24, 2025
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.

6 participants