You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "Abdulrehman-PIAIC80387 (via GitHub)" <gi...@apache.org> on 2026/06/11 09:03:22 UTC

[PR] fix(permalink): accept null entries in activeTabs for v5-imported dashboards [superset]

Abdulrehman-PIAIC80387 opened a new pull request, #40969:
URL: https://github.com/apache/superset/pull/40969

   ### SUMMARY
   
   Fixes #40934.
   
   \`DashboardPermalinkStateSchema.activeTabs\` is a Marshmallow \`fields.List(fields.String(), allow_none=True)\`. The list itself accepts \`None\`, but each **element** inside the list is a \`fields.String()\` without \`allow_none\`, so a list containing a \`None\` (e.g. \`[\"TAB-abc\", null, \"TAB-xyz\"]\`) fails validation with:
   
   \`\`\`json
   { \"message\": \"{'activeTabs': {N: ['Field may not be null.']}}\" }
   \`\`\`
   
   That is exactly the shape v5-exported dashboards persist when one or more tab levels has no active child. Importing such a dashboard into v6 and generating a permalink fails systematically.
   
   This PR adds \`allow_none=True\` to the inner \`fields.String\` so \`None\` entries are accepted while the outer list and the per-entry string typing are otherwise preserved.
   
   ### BEFORE / AFTER
   
   | | Before | After |
   |---|---|---|
   | \`activeTabs: [\"a\", null, \"b\"]\` | Validation error | Loaded as-is |
   | \`activeTabs: None\` (whole list null) | Loaded as None (unchanged) | Loaded as None (unchanged) |
   | \`activeTabs: [\"a\", 42]\` (non-string entry) | Validation error | Still rejected — defensive |
   
   ### TESTING INSTRUCTIONS
   
   \`\`\`bash
   pytest tests/unit_tests/dashboards/schema_tests.py -v
   \`\`\`
   
   Three new tests assert:
   
   | Test | Behavior |
   |---|---|
   | \`test_permalink_state_schema_accepts_null_in_active_tabs\` | The reported v5 import case is now accepted |
   | \`test_permalink_state_schema_still_accepts_null_active_tabs_list\` | The pre-existing \`allow_none\` on the outer list is unchanged |
   | \`test_permalink_state_schema_still_rejects_non_string_entries\` | The fix does not widen the type — non-string entries are still rejected |
   
   Manual verification:
   
   1. Import any v5 dashboard whose \`activeTabs\` includes a \`null\` (the issue contains a minimal repro export attached)
   2. Open the dashboard and click \"Share → Copy permalink\"
   3. Permalink is generated; previously it failed with the validation error above
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: #40934
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (please mention any potential downtime)
   - [ ] Migration is atomic, supports rollback & is backwards-compatible
   - [ ] Confirm DB migration upgrade and downgrade tested
   - [x] Runtime introduces no new dependencies / changes existing dependencies
   - [ ] 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(permalink): accept null entries in activeTabs for v5-imported dashboards [superset]

Posted by "xavier-GitHub76 (via GitHub)" <gi...@apache.org>.
xavier-GitHub76 commented on PR #40969:
URL: https://github.com/apache/superset/pull/40969#issuecomment-4688118761

   Thanks for the fix 👏


-- 
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(permalink): accept null entries in activeTabs for v5-imported dashboards [superset]

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


-- 
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(permalink): accept null entries in activeTabs for v5-imported dashboards [superset]

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

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/40969?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 55.64%. Comparing base ([`2b18dc0`](https://app.codecov.io/gh/apache/superset/commit/2b18dc0a5c4b11bb86df71413911c5d302a8ff12?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`f108195`](https://app.codecov.io/gh/apache/superset/commit/f108195ae6588374b16140127481b2f8366d73db?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   :x: Your project check has failed because the head coverage (99.95%) is below the target coverage (100.00%). You can increase the head coverage or adjust the [target](https://docs.codecov.com/docs/commit-status#target) coverage.
   > :exclamation:  There is a different number of reports uploaded between BASE (2b18dc0) and HEAD (f108195). Click for more details.
   > 
   > <details><summary>HEAD has 3 uploads less than BASE</summary>
   >
   >| Flag | BASE (2b18dc0) | HEAD (f108195) |
   >|------|------|------|
   >|python|5|2|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #40969      +/-   ##
   ==========================================
   - Coverage   64.23%   55.64%   -8.59%     
   ==========================================
     Files        2657     2657              
     Lines      144028   144028              
     Branches    33208    33208              
   ==========================================
   - Hits        92521    80151   -12370     
   - Misses      49885    63160   +13275     
   + Partials     1622      717     -905     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/40969/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/40969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.45% <ø> (ø)` | |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/40969/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/40969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.04% <ø> (ø)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/40969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.11% <ø> (-18.49%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/40969/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/40969/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/40969?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(permalink): accept null entries in activeTabs for v5-imported dashboards [superset]

Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber commented on PR #40969:
URL: https://github.com/apache/superset/pull/40969#issuecomment-4681966207

   Thank you @Abdulrehman-PIAIC80387 for the contribution! Great streak of PRs lately!


-- 
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(permalink): accept null entries in activeTabs for v5-imported dashboards [superset]

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

   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