Bug description
the bug is: 1. deck.gl.path does not show with JAVASCRIPT DATA INTERCEPTOR 2. it works when JAVASCRIPT DATA INTERCEPTOR is empty (same problem with https://github.com/apache/superset/issues/18696) 3. i test superset 2.1.2; 2.1.3; 3.0.0; 3.1.2 and 4.1.2 with docker image apache/superset, 2.1.2 and 2.1.3 is ok, others have problem.
Screenshots/recordings
No response
Superset version
4.1.2
Python version
3.10
Node version
16
Browser
Chrome
Additional context
No response
Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Comment From: dosubot[bot]
Hello @tmylt! I'm Dosu, here to help you with bugs, questions, and anything related to contributing. While you're waiting for a human maintainer, feel free to ask me anything!
The issue you're experiencing with the deck.gl.path
visualization not working when the JavaScript Data Interceptor is populated seems to be a known problem. Unfortunately, I couldn't find specific documentation or error logs related to this issue in the Superset repository. However, there is a known issue where the deck.gl Geojson path is not visible, which might be related to your problem [1].
Since version 2.1.2 works correctly, but versions 3.1.2 and 4.1.2 do not, it might be worth investigating changes made between these versions that could affect the interaction between the JavaScript Data Interceptor and the deck.gl.path
visualization. You might want to check the changelogs or commit history for any relevant changes.
If you haven't already, you could try isolating the problem by testing with different configurations or data sets to see if there are any specific conditions that trigger the issue. Additionally, reviewing the JavaScript Data Interceptor's configuration and ensuring it aligns with the expected setup for the deck.gl.path
visualization might help identify any discrepancies.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
Comment From: rusackas
We're open to PRs on this to fix any issues here, but the JS Tooltips feature is (as noted in the config) effectively deprecated and due for a more modern replacement due to security/complexity concerns.
Comment From: Prasad-JB
Hi, I’d like to help with this issue. I see it works fine in 2.1.2/2.1.3 but breaks from 3.0.0 onward. Could you point me to where the Data Interceptor and deck.gl path integration happens in the codebase so I can start digging?
Thanks!
Comment From: rusackas
@dosu holler if you have pointers to help steer a PR here.
Comment From: dosubot[bot]
Here are the main integration points to help steer a PR for the deck.gl path + JavaScript Data Interceptor issue:
- The JavaScript Data Interceptor logic is handled in the frontend, especially in the
superset-frontend/src/explore
directory. Look at files likeexploreUtils.js
andcontrols/ControlUtils.js
for transformation hooks (e.g., via thejavascript_data_key
field) that apply user-supplied JS to chart data before it reaches plugins. - For deck.gl path visualizations, the core rendering is in
legacy-preset-chart-deckgl/src/layers/Path/Path.jsx
(orPath.tsx
in newer versions). The main functions arecreateDeckGLComponent
andgetLayer
, which expect data in a specific format. Any incompatibility with intercepted data will likely show up here. - Multi-layer deck.gl charts use
Multi.tsx
, which dynamically adjusts the viewport using points extracted from each layer, including Path. ThegetPoints
function inPath.tsx
is key for extracting points from path data for viewport fitting and rendering. Changes here may affect compatibility with data transformed by the interceptor. See PR #33364 for recent fixes in this area. - There’s no direct documentation for this integration, so tracing the data flow from the Explore pipeline (where user JS is applied) to the Path layer is essential. If you find missing or unclear code comments, consider adding them in your PR.
- For context on related bugs and fixes, check out issue #18696 and PR #19059, which addressed a similar problem with the JS tooltip generator and Webpack 5 polyfills.
Focus your investigation on how the output of the JS Data Interceptor is mapped and validated before being passed to the Path layer, and compare handling between working (2.1.x) and broken (3.x+) versions. Security and sandboxing concerns are important, as this feature is deprecated and due for replacement.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: Prasad-JB
Thanks for the pointers @dosu I tested this on 2.1.x (where it works) and 3.x+ (where it breaks), and I’d like to trace the data flow between the JavaScript Data Interceptor and the deck.gl Path layer to see what changed. Could you assign this issue to me so I can start working on a fix?