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

chore(pyright): rebuild pyright pins on each buildkite build #20440

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

rexledesma
Copy link
Contributor

@rexledesma rexledesma commented Mar 12, 2024

Summary & Motivation

Prevent errors like #20406 from happening by always attempting to regenerate the pyright pins on each build.

I could put this in a separate step and scope it down to only run if any requirements.txt has changed in the pyright/ subdirectory, but want to see if the build time difference is negligible because of uv first.

How I Tested These Changes

bk

@rexledesma rexledesma requested a review from smackesey March 12, 2024 21:20
Copy link
Contributor Author

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

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

@rexledesma rexledesma force-pushed the rl/update-pins-pyright-build branch 2 times, most recently from 0f3dda9 to 5c2a6d8 Compare March 13, 2024 02:52
Copy link
Collaborator

@smackesey smackesey left a comment

Choose a reason for hiding this comment

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

Thanks for moving this forward. A few points:

  • make rebuild_pyright_pins will run pyright after building pins on its own, so there is no need for a follow-up make pyright
  • One reason the pins system is in place is to keep pyright results the same between local dev and CI. That would no longer be true after this PR-- a new dep could come out that changes annotations and causes irritating build errors ("unnecessary type ignore" highly likely from fixed annotations) in CI.

Bc of above I think we need:

  • A separate step that runs only on requirements.txt change (would be nice if it stays in the same BK UI group)
  • The run-pyright script needs to be modified with an option that will skip running pyright itself after building the venv, since we only care that the env builds, not that there are no type errors under the new pins. I am going to spin out a quick PR for this now that you can stack on.

PRs that add --skip-typecheck:

@rexledesma
Copy link
Contributor Author

rexledesma commented Mar 18, 2024

Building pins requires a reference to internal, so closing this.

#20565 has landed, so reopening this.

@rexledesma rexledesma closed this Mar 18, 2024
@rexledesma rexledesma deleted the rl/update-pins-pyright-build branch March 18, 2024 15:25
@rexledesma rexledesma restored the rl/update-pins-pyright-build branch March 19, 2024 20:59
@rexledesma rexledesma reopened this Mar 19, 2024
@rexledesma rexledesma force-pushed the rl/update-pins-pyright-build branch from 5c2a6d8 to ee27209 Compare March 19, 2024 21:12
@rexledesma rexledesma requested a review from smackesey March 19, 2024 21:20
@rexledesma rexledesma force-pushed the rl/update-pins-pyright-build branch 2 times, most recently from 032addc to 2a11b0e Compare March 19, 2024 21:27
@rexledesma rexledesma force-pushed the rl/update-pins-pyright-build branch from 2a11b0e to d4b9f6d Compare March 20, 2024 03:44
@rexledesma rexledesma requested a review from smackesey March 20, 2024 03:45
@rexledesma rexledesma merged commit 0a33908 into master Mar 20, 2024
1 check passed
@rexledesma rexledesma deleted the rl/update-pins-pyright-build branch March 20, 2024 13:50
PedramNavid pushed a commit that referenced this pull request Mar 28, 2024
## Summary & Motivation
Prevent errors like #20406
from happening by always attempting to regenerate the pyright pins on
each build.

I could put this in a separate step and scope it down to only run if any
`requirements.txt` has changed in the `pyright/` subdirectory, but want
to see if the build time difference is negligible because of `uv` first.

## How I Tested These Changes
bk
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