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

Update SQLAlchemy==1.4.50 #107

Closed
wants to merge 1 commit into from

Conversation

the-storm
Copy link
Contributor

Pre-submission checklist

  • I've ran the following linters locally and fixed lint errors related to the files I modified in this PR
    • black .
    • usort format .
    • flake8
  • I've installed dev dependencies pip install -r requirements-dev.txt and completed the following:
    • I've ran tests with ./scripts/run-tests.sh and made sure all tests are passing

Summary

Updating SQLAlchemy==1.4.50. After dce94af running SAPP returns the following import error

(venv) ielsayed@ibrahims-mbp-2 ~/s/r/l/b/v/l/p/site-packages ((90f4c285))> sapp --database-name=sapp.db --tool=mariana-trench analyze $MT_OUTPUT_DIR/
/python3.11/site-packages/sqlalchemy/orm/relationships.py:1994: SAWarning: Setting backref / back_populates on relationship Run.issue_instances to refer to viewonly relationship IssueInstance.run should include sync_backref=False set on the Run.issue_instances relationship.  (this warning may be suppressed after 10 occurrences)
  util.warn_limited(
/python3.11/site-packages/sqlalchemy/orm/relationships.py:1994: SAWarning: Setting backref / back_populates on relationship IssueInstance.run to refer to viewonly relationship Run.issue_instances should include sync_backref=False set on the IssueInstance.run relationship.  (this warning may be suppressed after 10 occurrences)
  util.warn_limited(
Traceback (most recent call last):
  File "/Users/ielsayed/storm_data/repos/lacework-sapp/build/venv/bin/sapp", line 5, in <module>
    from sapp.cli import cli
  File "python3.11/site-packages/sapp/cli.py", line 13, in <module>
    from .cli_lib import commands, common_options
  File "/python3.11/site-packages/sapp/cli_lib.py", line 29, in <module>
    from .pipeline.database_saver import DatabaseSaver
  File "/python3.11/site-packages/sapp/pipeline/database_saver.py", line 12, in <module>
    from ..bulk_saver import BulkSaver
  File "python3.11/site-packages/sapp/bulk_saver.py", line 13, in <module>
    from sqlalchemy.dialects.sqlite import insert as sqlite_insert
ImportError: cannot import name 'insert' from 'sqlalchemy.dialects.sqlite' (python3.11/site-packages/sqlalchemy/dialects/sqlite/__init__.py)

which indeed does NOT exist in latest version <1.4 but exists in version 1.4.50

1.4.50 is the latest version before 2.0.0 and it is needed by graphene version so I cannot bump SAPP to use latest version from SQLAlchemy

Test Plan

Re-running the command

sapp --database-name=sapp.db --tool=mariana-trench analyze $MT_OUTPUT_DIR/

does not produce the same error again

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 5, 2023
@facebook-github-bot
Copy link
Contributor

@arthaud has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@arthaud merged this pull request in ce0fbdf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants