Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #44144 +/- ##
==========================================
- Coverage 80.28% 80.27% -0.01%
==========================================
Files 2928 2928
Lines 174116 174372 +256
Branches 40402 40446 +44
==========================================
+ Hits 139782 139971 +189
- Misses 31677 31730 +53
- Partials 2657 2671 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
msyavuz
left a comment
There was a problem hiding this comment.
Core fix looks right: persisting Pending before enqueue and coalescing repeat/force POSTs closes both the spinner-as-Updated case and the per-poll task storm (every poll on a cache miss enqueued a new task on master). Two asks: fix the openapi drift check, and consider splitting the report/deck.gl readiness changes into their own PR so the API state-machine fix can land and be backported alone. Note nothing here stops an Updated entry from being evicted between the POST and a later GET, so 404-after-Updated can still happen on eviction-heavy caches.
4a90704 to
3044ae8
Compare
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
msyavuz
left a comment
There was a problem hiding this comment.
Prior threads check out against the head: default readiness predicate is logic-equivalent to master and the report dwell path is unchanged, locks and the setup-failure fallback are ordered correctly, markers match the backend selectors, openapi matches the schemas. pending() still nulls a good artifact on force, but since the UI now GETs only after Updated that's no longer observable.
One recurring gap in the new code: every readiness marker only has loading | rendered, with no terminal failed value. So a map/style/tile/registry failure doesn't produce a prompt Error, it burns the full readiness budget and then errors. The four inline comments below are instances of that; a failed marker value the backend selector treats as terminal would fix all of them.
45a1d09 to
6058626
Compare
217b79e to
25ec992
Compare
Code Review Agent Run #6d771cActionable Suggestions - 0Additional Suggestions - 5
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
EnxDev
left a comment
There was a problem hiding this comment.
I traced the generation lifecycle and capture changes at 25ec992 and found one cache-expiry case worth fixing below. I reproduced it with the PR's cache helpers and a controlled SimpleCache clock. The focused pytest run couldn't start because the configured SQLite test database was unavailable, so I haven't validated the full suite locally.
25ec992 to
a55d5eb
Compare
EnxDev
left a comment
There was a problem hiding this comment.
Thanks for fixing the generation-key reuse. I checked the UUID change and the expiry regression passes. This pass found one more case in the worker's cache-error handling, reproduced below. Focused validation: 204 tests passed; 10 failed because the isolated SQLite test database has no key_value table, so those lock-dependent checks remain unverified.
a55d5eb to
4be12fc
Compare
EnxDev
left a comment
There was a problem hiding this comment.
Thanks for the follow-up fixes. I checked the strict worker reads and their no-write regressions, the generation-key fix, the producer-lock response handling, and the capture/polling budget changes. I didn't find any additional actionable issues in this pass.
Validation on 4be12fc: 207 focused backend tests passed, including both cache-read failure regressions, and all 6 useDownloadScreenshot tests passed with the repository's Node 24 version. I excluded the 10 lock-dependent backend tests that need the missing test-database setup; I haven't run the API integration suite or a live browser export locally. Leaving this as a comment review given those validation limits.
SUMMARY
Make API/UI dashboard screenshot completion truthful:
Updatedis persisted only with a successfully captured artifact after the selected dashboard state reaches a stable terminal render state.Pendinggeneration before enqueueing, preserve prior artifact URLs, and coalesce concurrent forced requests.Errorfor incomplete captures and setup/cache failures without overwriting output completed by another worker.202producer /200observer convention.The signal covers Superset's chart-holder lifecycle plus the existing ECharts/AG Grid paint signals and blank-image validation. It does not claim a new completion contract for arbitrary third-party asynchronous canvas/WebGL plugins.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
On exact
master, a below-fold chart backed by a 45-second query and a 30-second screenshot wait was cached asUpdated; GET returned an 11,337-byte PNG containing a loading spinner. With this change, the same fixture transitionsPending→Computing→Errorand GET returns 404 in both standard and tiled modes.A browser UI export from a non-first top-level tab completed as
Updatedand downloaded the selected chart.TESTING INSTRUCTIONS
Automated and local verification on final commit
06b78ab259:pylintexecutable, and rated the branch 10/10.Errorplus artifact GET 404 for a chart exceedingSCREENSHOT_LOAD_WAIT.Manual verification:
THUMBNAILSandENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS, configure the screenshot cache/Celery, and start Superset plus a worker./api/v1/dashboard/<id>/cache_dashboard_screenshot/and recordcache_key,dashboard_url, andimage_url.dashboard_url, then poll the same POST endpoint with{"permalinkKey": "<key>"}untiltask_statusis terminal.Updatedand the returned PNG/PDF URL is HTTP 200.SCREENSHOT_LOAD_WAIT; confirm terminalErrorand artifact GET 404.Pendingwhile the prior generation URL remains downloadable.ADDITIONAL INFORMATION
THUMBNAILS,ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS