Skip to content

DM-4388: send a project on create, with a client-wide default_project - #57

Merged
jiatolentino merged 1 commit into
epic/DM-4993-projects-uifrom
DM-4388-send-project-on-create
Oct 22, 2026
Merged

jiatolentino merged 1 commit into
epic/DM-4993-projects-uifrom
DM-4388-send-project-on-create

Conversation

@jiatolentino

@jiatolentino jiatolentino commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Targets the projects UI epic, which has #55 and #56. TestPyPI build: 1.7.0.dev3.

Why

A DataMasque server with several active projects can reject a create that names no project, and the client has no way to name one.

What

  • New DataMasqueInstanceConfig.default_project: a <id>-<slug> reference such as 1-default, or a bare id.
  • Creating a connection, ruleset, discovery config, RG config or table reference sends the model's project, or default_project when that is unset. With neither set, nothing is sent, as before.
  • upload_file and upload_file_if_not_exists take a project argument with the same default.
  • Updating a connection sends no project. Libraries still take their project from namespace.

Testing

  • uv run pytest: 612 passed. Ruff, mypy, uv lock --check and the docs build are clean.
  • Against a local DataMasque with several active projects, the UI tests and library AITs created their resources in Default through default_project.

@jiatolentino jiatolentino self-assigned this Oct 15, 2026
@jiatolentino
jiatolentino marked this pull request as ready for review October 15, 2026 10:54
@jiatolentino
jiatolentino force-pushed the DM-4388-send-project-on-create branch from 57141ab to 4e550e9 Compare October 16, 2026 00:32
@jiatolentino
jiatolentino changed the base branch from DM-3624-model-project-field to epic/DM-4993-projects-ui October 16, 2026 00:33
Comment thread datamasque/client/connections.py Resolved
Comment thread datamasque/client/files.py Resolved
@jiatolentino
jiatolentino force-pushed the DM-4388-send-project-on-create branch from 4e550e9 to d3d0e80 Compare October 19, 2026 05:59
`DataMasqueInstanceConfig.default_project` names the project a create goes
into when its model has no `project`. Every create of a connection,
ruleset, discovery config, RG config, table reference or library sends
it, and `create_or_update_*` looks for an existing resource in it, before
falling back to the server's only active project. Updating a connection
leaves it in its project.
@jiatolentino
jiatolentino force-pushed the DM-4388-send-project-on-create branch from 6a2e4cc to 38964bf Compare October 22, 2026 04:02
@jiatolentino
jiatolentino merged commit 1fb48b8 into epic/DM-4993-projects-ui Oct 22, 2026
@jiatolentino
jiatolentino deleted the DM-4388-send-project-on-create branch October 22, 2026 09:35
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.

3 participants