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

Fix mypy cache dir not being created #20139

Merged
merged 4 commits into from
Nov 2, 2023

Conversation

csqzhang
Copy link
Contributor

@csqzhang csqzhang commented Nov 2, 2023

This PR fixes an issue/bug mentioned in #19888.

Problem
Internal mypy cache directory/folder used by Pants is not being created. Therefore, the mypy cache cannot moved copied from temporary cache location here

Solution
Make sure the mypy cache directory/folder is created.

@thejcannon
Copy link
Member

I approved, but would you mind fleshing out the Pull Request description a bit?

Namely, how it fixes the issue? Thanks!

@csqzhang
Copy link
Contributor Author

csqzhang commented Nov 2, 2023

I approved, but would you mind fleshing out the Pull Request description a bit?

Namely, how it fixes the issue? Thanks!

Sure. Updated the description a bit.
Also I made a seperate mkdir for the change. The reason is that the mypy cache dir may be there already and I am not sure if those two mkdirs would inference each other if one fails.

@csqzhang
Copy link
Contributor Author

csqzhang commented Nov 2, 2023

I wonder how can I get it merged and released (possibly in 2.18) ?

@thejcannon thejcannon added category:bugfix Bug fixes for released features needs-cherrypick labels Nov 2, 2023
@thejcannon thejcannon added this to the 2.18.x milestone Nov 2, 2023
@thejcannon
Copy link
Member

I wonder how can I get it merged and released (possibly in 2.18) ?

You ask :) Just applied the relevant labels to the PR

@thejcannon
Copy link
Member

LGTM. I'll enable auto-merge. Thanks for the PR! 🙌

@thejcannon thejcannon enabled auto-merge (squash) November 2, 2023 15:22
@thejcannon thejcannon merged commit 90cf800 into pantsbuild:main Nov 2, 2023
24 checks passed
WorkerPants pushed a commit that referenced this pull request Nov 2, 2023
This PR fixes an issue/bug mentioned in #19888. 

**Problem**
Internal mypy cache directory/folder used by Pants is not being created.
Therefore, the mypy cache cannot moved copied from temporary cache
location
[here](https://github.com/pantsbuild/pants/blob/d5ffed441396d89a2a7bc52fc994c52a00808f8a/src/python/pants/backend/python/typecheck/mypy/rules.py#L306)

**Solution**
Make sure the mypy cache directory/folder is created.

---------

Co-authored-by: Josh Cannon <joshdcannon@gmail.com>
@WorkerPants
Copy link
Member

I tried to automatically cherry-pick this change back to each relevant milestone, so that it is available in those older releases of Pants.

✔️ 2.18.x

Successfully opened #20142.


Thanks again for your contributions!

🤖 Beep Boop here's my run link

huonw pushed a commit that referenced this pull request Nov 2, 2023
This PR fixes an issue/bug mentioned in #19888. 

**Problem**
Internal mypy cache directory/folder used by Pants is not being created.
Therefore, the mypy cache cannot moved copied from temporary cache
location
[here](https://github.com/pantsbuild/pants/blob/d5ffed441396d89a2a7bc52fc994c52a00808f8a/src/python/pants/backend/python/typecheck/mypy/rules.py#L306)

**Solution**
Make sure the mypy cache directory/folder is created.

Co-authored-by: csqzhang <csqzhang@gmail.com>
Co-authored-by: Josh Cannon <joshdcannon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants