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/05/18 03:22:27 UTC

[PR] test(api): regression test for Admin empty dashboard/chart list (#25890) [superset]

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

   ### SUMMARY
   
   This is a **test-only PR** opened as a TDD-style validation of issue #25890.
   
   #25890 (filed 2023-11) reports that `GET /api/v1/dashboard/` and `GET /api/v1/chart/` return `{\"count\": 0, \"ids\": []}` when called by an Admin-role user, even when dashboards/charts exist in the database.
   
   This PR adds two regression tests on the list endpoints:
   
   1. **`test_get_dashboards_admin_sees_existing_dashboards`** — inserts a dashboard, logs in as admin, asserts the response `count >= 1` and the inserted title appears.
   2. **`test_get_charts_admin_sees_existing_charts`** — same pattern for `api/v1/chart/`.
   
   ### How to interpret CI
   
   - **CI green** → Admin RBAC on these endpoints is correct; merging closes #25890 and locks in the regression guard.
   - **CI red** → bug is still live. Likely fix region: base filter / `BaseFilter` chain in `superset/dashboards/filters.py` and `superset/charts/filters.py`, or the `RoleModelView` permission grants for Admin.
   
   ### TESTING INSTRUCTIONS
   
   \`\`\`bash
   pytest tests/integration_tests/dashboards/api_tests.py::TestDashboardApi::test_get_dashboards_admin_sees_existing_dashboards -v
   pytest tests/integration_tests/dashboards/api_tests.py::TestDashboardApi::test_get_charts_admin_sees_existing_charts -v
   \`\`\`
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: closes #25890
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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] test(api): regression test for Admin empty dashboard/chart list (#25890) [superset]

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


-- 
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] test(api): regression test for Admin empty dashboard/chart list (#25890) [superset]

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

   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


Re: [PR] test(api): regression test for Admin empty dashboard/chart list (#25890) [superset]

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

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/40202?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 63.39%. Comparing base ([`6c4c3dc`](https://app.codecov.io/gh/apache/superset/commit/6c4c3dc71c235a4218a50503e723a8bbf6818d7f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`4ada733`](https://app.codecov.io/gh/apache/superset/commit/4ada7338f0b1e7f248ce54f26451c2223ed30591?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 5 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #40202      +/-   ##
   ==========================================
   - Coverage   64.16%   63.39%   -0.77%     
   ==========================================
     Files        2591     2591              
     Lines      138163   138163              
     Branches    32048    32048              
   ==========================================
   - Hits        88649    87593    -1056     
   - Misses      47985    49034    +1049     
   - Partials     1529     1536       +7     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/40202/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/40202/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.46% <ø> (ø)` | |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/40202/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/40202/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/40202/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.15% <ø> (ø)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/40202/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `59.00% <ø> (-1.68%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/40202/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `58.87% <ø> (ø)` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/40202/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 Sentry](https://app.codecov.io/gh/apache/superset/pull/40202?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