You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/07/30 08:15:44 UTC

[PR] fix(alerts-reports): skip inactive users when resolving report executor [superset]

rusackas opened a new pull request, #42612:
URL: https://github.com/apache/superset/pull/42612

   ### SUMMARY
   `get_executor()` (used to pick who Alerts & Reports / thumbnails run as) resolved the creator, modifier, and editors of a report/dashboard without ever checking `User.is_active`. If the report's creator became inactive, execution would try to authenticate as that inactive user, and instead of raising a clear error it surfaced downstream as an opaque `ReportScheduleScreenshotFailedError` — even when the report had other, currently-active owners/editors.
   
   This fixes `get_executor` to skip inactive users at each resolution step (`CREATOR`, `MODIFIER`, `CREATOR_EDITOR`, `MODIFIER_EDITOR`, and within the `EDITOR` fallback chain: modifier → creator → direct user editor → indirect role/group editor), falling through to another active candidate instead of picking a dead-end user. `ExecutorNotFoundError` is now only raised once no active candidate remains.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   N/A (backend logic fix)
   
   ### TESTING INSTRUCTIONS
   `pytest tests/unit_tests/tasks/test_utils.py -q`
   
   Added parametrized cases to `test_get_executor` that pin the bug: an inactive creator/modifier is skipped in favor of a fallback executor type or an active editor, and `ExecutorNotFoundError` is only raised when no active candidate exists at all. These new cases fail against the pre-fix code and pass after.
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: Fixes #33584
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(alerts-reports): skip inactive users when resolving report executor [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #42612:
URL: https://github.com/apache/superset/pull/42612


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(alerts-reports): skip inactive users when resolving report executor [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #42612:
URL: https://github.com/apache/superset/pull/42612#issuecomment-5128378248

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/42612?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `0%` with `8 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 55.95%. Comparing base ([`673f928`](https://app.codecov.io/gh/apache/superset/commit/673f9285892dd09b5b3a0bfa24a4fa844b918266?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`8dbed19`](https://app.codecov.io/gh/apache/superset/commit/8dbed19c45ce7b4dee41a124202a6b7cdc9838e4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/42612?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [superset/tasks/utils.py](https://app.codecov.io/gh/apache/superset/pull/42612?src=pr&el=tree&filepath=superset%2Ftasks%2Futils.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvdGFza3MvdXRpbHMucHk=) | 0.00% | [8 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/42612?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   > :exclamation:  There is a different number of reports uploaded between BASE (673f928) and HEAD (8dbed19). Click for more details.
   > 
   > <details><summary>HEAD has 92 uploads less than BASE</summary>
   >
   >| Flag | BASE (673f928) | HEAD (8dbed19) |
   >|------|------|------|
   >|python|72|2|
   >|presto|12|1|
   >|hive|12|1|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #42612      +/-   ##
   ==========================================
   - Coverage   65.33%   55.95%   -9.39%     
   ==========================================
     Files        2803     2803              
     Lines      158490   158490              
     Branches    36178    36178              
   ==========================================
   - Hits       103557    88690   -14867     
   - Misses      52922    68968   +16046     
   + Partials     2011      832    -1179     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/42612/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/42612/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.21% <0.00%> (ø)` | |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/42612/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [postgres](https://app.codecov.io/gh/apache/superset/pull/42612/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/42612/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.12% <0.00%> (ø)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/42612/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.17% <0.00%> (-18.91%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/42612/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/42612/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/42612?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(alerts-reports): skip inactive users when resolving report executor [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42612:
URL: https://github.com/apache/superset/pull/42612#issuecomment-5128333232

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org