Skip to content

Conversation

@tuantran0910
Copy link
Contributor

SUMMARY

Updates SupersetSecurityManager to use the modern session property instead of the deprecated get_session method when querying the database.

After Flask-AppBuilder version v5.x, the method to access the security manager’s database session has changed.

Before (v4.x):

# Old session access method
session = appbuilder.sm.get_session

After (v5.x):

# New session access method
session = appbuilder.sm.session

Link: https://flask-appbuilder.readthedocs.io/en/latest/versionmigration.html

Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

I've completed my review and didn't find any issues.

Files scanned
File Path Reviewed
superset/security/manager.py

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@tuantran0910 tuantran0910 force-pushed the fix/security-manager-session branch from 663fe60 to f99efb2 Compare September 25, 2025 12:55
@dosubot dosubot bot added the change:backend Requires changing the backend label Sep 25, 2025
@tuantran0910 tuantran0910 changed the title fix(security): switch from deprecated get_session to session attribute fix(security-manager): switch from deprecated get_session to session attribute Sep 25, 2025
Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.86%. Comparing base (0de78d8) to head (f99efb2).
⚠️ Report is 70 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #35290       +/-   ##
===========================================
+ Coverage        0   71.86%   +71.86%     
===========================================
  Files           0      587      +587     
  Lines           0    43483    +43483     
  Branches        0     4701     +4701     
===========================================
+ Hits            0    31248    +31248     
- Misses          0    11006    +11006     
- Partials        0     1229     +1229     
Flag Coverage Δ
hive 46.28% <ø> (?)
mysql 70.88% <ø> (?)
postgres 70.94% <ø> (?)
presto 49.96% <ø> (?)
python 71.82% <ø> (?)
sqlite 70.53% <ø> (?)
unit 100.00% <ø> (?)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tuantran0910
Copy link
Contributor Author

Hi @mistercrunch, can we get this PR merged :D

@mistercrunch mistercrunch merged commit 04b1a45 into apache:master Oct 3, 2025
64 of 65 checks passed
sadpandajoe pushed a commit that referenced this pull request Oct 3, 2025
@sadpandajoe sadpandajoe added the v6.0 Label added by the release manager to track PRs to be included in the 6.0 branch label Oct 3, 2025
amaannawab923 pushed a commit to amaannawab923/superset that referenced this pull request Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:backend Requires changing the backend size/XS v6.0 Label added by the release manager to track PRs to be included in the 6.0 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants