You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "eschutho (via GitHub)" <gi...@apache.org> on 2026/07/17 00:30:23 UTC
[PR] fix(dashboard): add cacheKey, dashboardId, and format context to screenshot download error logs [superset]
eschutho opened a new pull request, #42121:
URL: https://github.com/apache/superset/pull/42121
### Decisions made that were not in the instructions
- Also enriched the initial-request-failure log (`SupersetClient.post(...).catch(...)`), since it's a terminal-failure path in the same download flow and previously logged only the bare `error` object with no identifying context.
- Used two distinct message strings ("Max retries reached" vs "Failed to trigger dashboard screenshot") to keep the two failure paths distinguishable in log output, rather than reusing one generic string.
### SUMMARY
`useDownloadScreenshot` polls a screenshot endpoint after triggering a direct dashboard PDF/PNG download, and previously logged terminal failures with no identifying context:
- `logging.error('Max retries reached')` when retry polling was exhausted.
- `logging.error(error)` when the initial trigger request failed.
Neither log call included the cache key, dashboard id, or requested format, making it impossible to correlate a client-side download failure with server-side logs for the same attempt (e.g. cache-key-keyed logs on the screenshot-cache-validation path).
This PR passes that context as structured arguments to `logging.error`, following `console.error(message, ...args)` semantics, so the values remain accessible to any consumer that parses the additional console arguments:
- Retry-exhausted path now logs `logging.error('Max retries reached', { cacheKey, dashboardId, format })`.
- Initial-request-failure path now logs `logging.error('Failed to trigger dashboard screenshot', { dashboardId, format, error })`.
No behavior changes — no new retries, toasts, or timing changes. Purely additive log context.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — logging-only change, no UI impact.
### TESTING INSTRUCTIONS
- Added two unit tests to the existing `useDownloadScreenshot.test.ts` asserting the enriched log calls include the expected fields:
- `logs cacheKey, dashboardId, and format when retries are exhausted`
- `logs dashboardId, format, and the error when the initial screenshot request fails`
- Ran `npx jest src/dashboard/hooks/useDownloadScreenshot.test.ts` — all 5 tests pass (3 pre-existing + 2 new).
- Ran `pre-commit run` (prettier, oxlint, custom rules, stylelint, frontend type-checking) on the changed files — all pass.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] 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(dashboard): add cacheKey, dashboardId, and format context to screenshot download error logs [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #42121:
URL: https://github.com/apache/superset/pull/42121
--
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(dashboard): add cacheKey, dashboardId, and format context to screenshot download error logs [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #42121:
URL: https://github.com/apache/superset/pull/42121#issuecomment-4997873464
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/42121?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 65.09%. Comparing base ([`5067230`](https://app.codecov.io/gh/apache/superset/commit/50672304840bf5473867f2e8daa4adf6cf234a5d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`a1d58fb`](https://app.codecov.io/gh/apache/superset/commit/a1d58fbb38de69eae94e0d5fa3999333249df40c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #42121 +/- ##
=======================================
Coverage 65.09% 65.09%
=======================================
Files 2752 2752
Lines 154527 154527
Branches 35443 35443
=======================================
+ Hits 100587 100595 +8
+ Misses 52028 52020 -8
Partials 1912 1912
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/42121/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/42121/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.63% <100.00%> (+0.01%)` | :arrow_up: |
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/42121?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(dashboard): add cacheKey, dashboardId, and format context to screenshot download error logs [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42121:
URL: https://github.com/apache/superset/pull/42121#issuecomment-4997790707
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