Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --no-cache option to run_pyright script #24212

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

smackesey
Copy link
Collaborator

@smackesey smackesey commented Sep 4, 2024

Summary & Motivation

The uv cache can cause subtle problems sometimes when rebuilding pyright environments. Rebuilding envs without using the cache can fix an apparently intractable problem. This PR adds --no-cache as an arg to run-pyright.py. This is intended for rare use as an escape hatch for pyright env problems-- it makes rebuilding the envs much more slow.

See this issue I posted over at uv for some info about why you might want to use this: astral-sh/uv#7028

How I Tested These Changes

My pyright was (unresolvable imports for all dagster packages). After rebuilding my env with --no-cache the problem went away. The issue was that the cache seemed to be holding pth files for our dagster editables that did not respect editable_mode=compat and were incorrectly formatted for pyright.

Changelog [New | Bug | Docs]

NOCHANGELOG

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @smackesey and the rest of your teammates on Graphite Graphite

@smackesey smackesey marked this pull request as ready for review September 4, 2024 15:20
@smackesey smackesey requested a review from benpankow September 4, 2024 15:28
nvidia-cusparse-cu12==12.1.0.106
nvidia-nccl-cu12==2.20.5
nvidia-nvjitlink-cu12==12.6.20
nvidia-nvtx-cu12==12.1.105
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removal is unrelated to this PR, but these shouldn't be here

Copy link
Member

@benpankow benpankow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really appreciate you fixing this 🙏

@smackesey smackesey merged commit de3b1af into master Sep 4, 2024
1 check passed
@smackesey smackesey deleted the sean/add-pyright-no-cache branch September 4, 2024 19: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.

2 participants