Skip to content

detect new models in the UI when the project path is a symlink#5861

Draft
p-j-smith wants to merge 4 commits into
SQLMesh:mainfrom
p-j-smith:paul/5860-sylinked-project-breaks-ui
Draft

detect new models in the UI when the project path is a symlink#5861
p-j-smith wants to merge 4 commits into
SQLMesh:mainfrom
p-j-smith:paul/5860-sylinked-project-breaks-ui

Conversation

@p-j-smith

@p-j-smith p-j-smith commented Jun 25, 2026

Copy link
Copy Markdown

Description

Fixes #5860

  • awatch can report resolved paths even for a symlinked root, which broke the watcher's path handling. Now, compare paths in resolved space and re-root under the project path so it works either way
  • Resolve the path in the model-dir (in_paths) check too, so new files under a symlinked project get tracked.
  • Currently there a check in watch_project that is always truthy (should_reset_mtime = change == Change.added or is_modified_new_file). Fix this so that should_reset_mtime is not always True

Test Plan

Added a new file tests/web/test_watcher.py that:

  • adds a fixture that creates a new project and symlink to to it
  • add a test that creates a Context with the symlinked project. Add a new file and check it is picked up by the watcher

Checklist

  • I have run make style and fixed any issues
  • I have added tests for my changes (if applicable)
  • All existing tests pass (make fast-test)
  • My commits are signed off (git commit -s) per the DCO
Test that the watcher picks up files created in a Context where the project is a symlinked path

Signed-off-by: Paul Smith <paul.j.smith@ucl.ac.uk>
 can report resolved paths even when the watched root is a
symlink, so the watcher's  and model-dir
checks failed and new files were never tracked, meaning newly created models never
showed up in the UI. Compare paths in resolved space and re-root under the
project path

Signed-off-by: Paul Smith <paul.j.smith@ucl.ac.uk>
Signed-off-by: Paul Smith <paul.j.smith@ucl.ac.uk>
Signed-off-by: Paul Smith <paul.j.smith@ucl.ac.uk>
@p-j-smith p-j-smith marked this pull request as draft June 29, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant