-
Notifications
You must be signed in to change notification settings - Fork 442
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
added support for Pysa Model Validation in VSCode Extension #433
base: main
Are you sure you want to change the base?
added support for Pysa Model Validation in VSCode Extension #433
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looking pretty good! Can you please rebase on master, now that we've landed your previous PR?
26ca99e
to
f9ff34e
Compare
@gbleaney has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
cfc6f3f
to
d8fbdfd
Compare
@m0mosenpai has updated the pull request. You must reimport the pull request before landing. |
d8fbdfd
to
92af495
Compare
@m0mosenpai has updated the pull request. You must reimport the pull request before landing. |
1 similar comment
@m0mosenpai has updated the pull request. You must reimport the pull request before landing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty great! Some really small comments. At the same time I'll import this and make sure it passes our internal CI
@gbleaney has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@m0mosenpai has updated the pull request. You must reimport the pull request before landing. |
@m0mosenpai there are two tests failing: I believe you should be able to tweak both of the tests to do the import from one level higher (like you're doing locally). That should unblock landing this PR |
@m0mosenpai has updated the pull request. You must reimport the pull request before landing. |
e162b8c
to
a2fcab4
Compare
@m0mosenpai has updated the pull request. You must reimport the pull request before landing. |
2 similar comments
@m0mosenpai has updated the pull request. You must reimport the pull request before landing. |
@m0mosenpai has updated the pull request. You must reimport the pull request before landing. |
@gbleaney |
@m0mosenpai This is the command that the first test is running: If you look into the script that runs that test, you can see that it just pyre-check/scripts/run-python-tests.sh Lines 10 to 13 in e40e8c2
You should be able to just tweak that test to This is the command that the second test is running: You can see that is just runs a second script: pyre-check/documentation/deliberately_vulnerable_flask_app/run_integration_tests.sh Lines 7 to 9 in e40e8c2
That test invokes the Pyre CLI from inside the pyre-check/tools/pysa_integration_tests/utils.py Lines 156 to 161 in e40e8c2
You'll just need to change that to invoke from one dir higher, just like you did locally |
@m0mosenpai has updated the pull request. You must reimport the pull request before landing. |
Summary: Related to discussion on this with gbleaney. PR #433 use of relative imports causes `Import beyond top-level package` errors. Internally, relative imports are required to pass the tests whereas on GitHub, this causes issues. This PR fixes that issue by running tests from one directory higher, unblocking #433. Pull Request resolved: #461 Reviewed By: dkgi Differential Revision: D30518016 Pulled By: gbleaney fbshipit-source-id: e7d76f2059bde5110849923887f928459228e0a8
This reverts commit 9b2a4cb.
ee73685
to
19cf7e5
Compare
@m0mosenpai has updated the pull request. You must reimport the pull request before landing. |
@m0mosenpai has updated the pull request. You must reimport the pull request before landing. |
Follow up to #409
This PR adds the implementation of model validation feature into Pysa's VSCode Plugin.
Working Examples
Screenshots showing the running extensions after these changes (the errors displayed are such due to misconfigured typeshed)
The edge case where Pyre is not able to parse the file, the following error is displayed and the extension continues to work: