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/09/29 06:27:20 UTC

[PR] fix(reports): propagate force flag to dashboard-tab permalink report URLs [superset]

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

   ### SUMMARY
   Adopts #38691 (originally by @ferjanin), rebased onto current `master` and with the review feedback from that PR folded in.
   
   `_get_tab_url()` in `superset/commands/report/execute.py` builds the dashboard permalink used to screenshot a dashboard report when a tab or filter state is set (`ALERT_REPORT_TABS`). It never propagated `force_screenshot` ("Ignore cache when generating report") into that URL, unlike the plain-dashboard and chart report paths, which both already do this. So enabling "Ignore cache" on a dashboard report with a tab/filter state selected was a silent no-op.
   
   This also pulls the repeated `force = "true" if self._report_schedule.force_screenshot else "false"` ternary (previously duplicated in `_get_url` and `get_dashboard_urls`) into one `_get_force_param()` helper, now shared by all three URL builders, per the dedup ask on the original PR.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   N/A - backend URL generation + test coverage only.
   
   ### TESTING INSTRUCTIONS
   ```
   SUPERSET_HOME=/tmp/superset_test pytest -q tests/unit_tests/commands/report/execute_test.py
   SUPERSET_HOME=/tmp/superset_test pytest -q tests/integration_tests/reports/commands/execute_dashboard_report_tests.py
   ```
   Manually: enable "Ignore cache when generating report" on a dashboard report whose `extra.dashboard` carries a tab/filter state, trigger it, and confirm the permalink URL passed to the screenshot step includes `force=true`.
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue:
     - Fixes #38672
     - Supersedes #38691
   - [ ] 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
   
   ๐Ÿค– 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] fix(reports): propagate force flag to dashboard-tab permalink report URLs [superset]

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


-- 
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(reports): propagate force flag to dashboard-tab permalink report URLs [superset]

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

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers an incremental AI Review.
   - `/review full` - Manually triggers a full AI Review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </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(reports): propagate force flag to dashboard-tab permalink report URLs [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44775:
URL: https://github.com/apache/superset/pull/44775#discussion_r4131584349


##########
superset/commands/report/execute.py:
##########
@@ -849,6 +858,7 @@ def _get_tab_url(
         return get_url_path(
             "Superset.dashboard_permalink",
             key=permalink_key,
+            force=force,

Review Comment:
   โœ… **CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved** as of `a922951`.
   
   The permalink state now removes any existing `force` entries from `urlParams` before creating the permalink, ensuring the explicitly passed `force` value is authoritative.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



-- 
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(reports): propagate force flag to dashboard-tab permalink report URLs [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #44775:
URL: https://github.com/apache/superset/pull/44775#discussion_r4131584024


##########
superset/commands/report/execute.py:
##########
@@ -849,6 +858,7 @@ def _get_tab_url(
         return get_url_path(
             "Superset.dashboard_permalink",
             key=permalink_key,
+            force=force,

Review Comment:
   Good catch. Stripped any pre-existing `force` entry from urlParams before building the permalink state so it can't shadow the one we append (a922951f2b09).



-- 
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(reports): propagate force flag to dashboard-tab permalink report URLs [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44775:
URL: https://github.com/apache/superset/pull/44775#discussion_r4130347185


##########
superset/commands/report/execute.py:
##########
@@ -849,6 +858,7 @@ def _get_tab_url(
         return get_url_path(
             "Superset.dashboard_permalink",
             key=permalink_key,
+            force=force,

Review Comment:
   **Suggestion:** When permalink state already contains `force=false`, the redirect appends it before this query parameter, and `URLSearchParams.get` reads the first value, so `force_screenshot=true` is ignored.
   
   **Assessment:** ๐ŸŸ  `Major` ยท ๐Ÿ” `Occurrence: Rarely` ยท ๐Ÿท๏ธ `Logic error`
   
   [![Use CodeAnt Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [![Fix in Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=2045c199172b4c59b3f4a5d1f5e5cf24&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [![Fix in VSCode Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=2045c199172b4c59b3f4a5d1f5e5cf24&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent ๐Ÿค– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/commands/report/execute.py
   **Line:** 861:861
   **Comment:**
   	*Logic Error: When permalink state already contains `force=false`, the redirect appends it before this query parameter, and `URLSearchParams.get` reads the first value, so `force_screenshot=true` is ignored.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44775&comment_hash=cc56dc17e37c1895744b388d0695eb703fe870a3a499124b3fd9bb7e0f6256ae&reaction=like'>๐Ÿ‘</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44775&comment_hash=cc56dc17e37c1895744b388d0695eb703fe870a3a499124b3fd9bb7e0f6256ae&reaction=dislike'>๐Ÿ‘Ž</a>



-- 
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(reports): propagate force flag to dashboard-tab permalink report URLs [superset]

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

   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] fix(reports): propagate force flag to dashboard-tab permalink report URLs [superset]

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

   <!-- Bito Reply -->
   The flagged issue is correct. When a URL already contains query parameters (like `force=false` in a permalink), appending a new parameter using a simple string concatenation or basic URL builder can lead to multiple `force` parameters. If the client-side code uses `URLSearchParams.get()`, it will only read the first occurrence, causing the intended `force=true` to be ignored.
   
   To resolve this, you should ensure the URL is constructed using a proper URL manipulation library that handles parameter merging or replacement correctly, rather than simple string appending. In Python, `urllib.parse` can be used to parse the URL, update the query parameters, and reconstruct it.
   
   Would you like me to fetch all other comments on this PR to validate and implement fixes for them as well?
   
   **superset/commands/report/execute.py**
   ```
   from urllib.parse import urlencode, urlparse, urlunparse, parse_qsl
   
   def update_url_query(url: str, params: dict) -> str:
       parsed = urlparse(url)
       query = dict(parse_qsl(parsed.query))
       query.update(params)
       return urlunparse(parsed._replace(query=urlencode(query)))
   ```


-- 
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(reports): propagate force flag to dashboard-tab permalink report URLs [superset]

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

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/44775?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 `20.00000%` with `4 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 57.27%. Comparing base ([`ca3d356`](https://app.codecov.io/gh/apache/superset/commit/ca3d3560895c52db7a2a0c3c265c09a51902ae25?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`2165799`](https://app.codecov.io/gh/apache/superset/commit/216579926e61852e2c1b5fae29d31d4d27c51ba2?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/44775?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/commands/report/execute.py](https://app.codecov.io/gh/apache/superset/pull/44775?src=pr&el=tree&filepath=superset%2Fcommands%2Freport%2Fexecute.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvY29tbWFuZHMvcmVwb3J0L2V4ZWN1dGUucHk=) | 20.00% | [4 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/44775?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 (ca3d356) and HEAD (2165799). Click for more details.
   > 
   > <details><summary>HEAD has 25 uploads less than BASE</summary>
   >
   >| Flag | BASE (ca3d356) | HEAD (2165799) |
   >|------|------|------|
   >|python|21|2|
   >|presto|4|1|
   >|hive|4|1|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #44775       +/-   ##
   ===========================================
   - Coverage   81.51%   57.27%   -24.24%     
   ===========================================
     Files        2973     2973               
     Lines      180273   180276        +3     
     Branches    41734    41734               
   ===========================================
   - Hits       146949   103257    -43692     
   - Misses      30601    76012    +45411     
   + Partials     2723     1007     -1716     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/44775/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/44775/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.70% <20.00%> (-0.01%)` | :arrow_down: |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/44775/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/44775/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/44775/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.62% <20.00%> (-0.01%)` | :arrow_down: |
   | [python](https://app.codecov.io/gh/apache/superset/pull/44775/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.67% <20.00%> (-46.99%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/44775/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/44775/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/44775?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