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: SQLAlchemy coercing subquery warning on RLS #21257

Conversation

dpgaspar
Copy link
Member

SUMMARY

Fix for SQLAlchemy warning:

/usr/local/lib/python3.8/site-packages/superset/security/manager.py:1499: SAWarning: Coercing Subquery object into a select() for use in IN(); please pass a select() construct explicitly
  RowLevelSecurityFilter.id.in_(regular_filter_roles),

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Aug 30, 2022

Codecov Report

Merging #21257 (951bee1) into master (b354f22) will decrease coverage by 0.17%.
The diff coverage is n/a.

❗ Current head 951bee1 differs from pull request most recent head 0fe9eb7. Consider uploading reports for the commit 0fe9eb7 to get more accurate results

@@            Coverage Diff             @@
##           master   #21257      +/-   ##
==========================================
- Coverage   66.46%   66.28%   -0.18%     
==========================================
  Files        1784     1784              
  Lines       68162    68162              
  Branches     7265     7265              
==========================================
- Hits        45302    45183     -119     
- Misses      20991    21110     +119     
  Partials     1869     1869              
Flag Coverage Δ
hive ?
mysql 80.87% <ø> (ø)
postgres 80.93% <ø> (ø)
presto ?
python 81.04% <ø> (-0.37%) ⬇️
sqlite 79.44% <ø> (ø)
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/security/manager.py 95.07% <ø> (ø)
superset/db_engines/hive.py 0.00% <0.00%> (-85.19%) ⬇️
superset/db_engine_specs/hive.py 71.09% <0.00%> (-16.02%) ⬇️
superset/db_engine_specs/presto.py 81.32% <0.00%> (-6.63%) ⬇️
superset/models/sql_lab.py 74.90% <0.00%> (-2.00%) ⬇️
superset/initialization/__init__.py 89.96% <0.00%> (-1.74%) ⬇️
superset/connectors/sqla/models.py 89.79% <0.00%> (-0.71%) ⬇️
superset/db_engine_specs/base.py 87.89% <0.00%> (-0.32%) ⬇️
superset/models/core.py 88.65% <0.00%> (-0.24%) ⬇️
superset/utils/core.py 90.23% <0.00%> (-0.12%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dpgaspar dpgaspar merged commit 6223042 into apache:master Aug 31, 2022
@dpgaspar dpgaspar deleted the danielgaspar/sc-56502/reduce-pii-alerts-fix-sqlalchemy-warning branch August 31, 2022 07:17
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants