Comments (9)
The issue you're encountering with Apache Superset's frontend proxy not supporting zstd
encoding likely stems from an indirect dependency update within Superset's Python environment. While the webpack.proxy-config.js
is configured to handle gzip
, br
, and deflate
encodings, it does not include support for zstd
1. This absence means that when the backend serves content with zstd
encoding, the proxy cannot decode it, leading to the display issues you've observed.
To identify the package that might have introduced zstd
as a default encoding, you would need to review recent changes to the dependencies listed in Superset's pyproject.toml
. Although zstd
is not listed as a direct dependency, it could be introduced through other libraries, especially those related to data processing or compression. For instance, the pandas
package, with its [performance]
extra, includes optional dependencies that could utilize zstd
compression, such as pyarrow
2.
Adding support for zstd
in the Node.js proxy would require integrating a decompression mechanism into webpack.proxy-config.js
, similar to how other encodings are handled. This integration would depend on the availability of a Node.js module capable of decompressing zstd
encoded data. As of the last update, adding such support might involve using third-party modules like node-zstd
, though direct support in Node.js for zstd
is not yet standard.
For a more immediate solution, ensuring that all developers are using the same version of Python packages, as you've done, can prevent the issue from occurring by avoiding the introduction of zstd
encoding. Additionally, investigating the specific versions of indirect dependencies related to compression could help pinpoint the source of the zstd
encoding.
Details
Sources
- CHANGELOG/2.0.0.md
- superset-frontend/webpack.proxy-config.js
- superset-frontend/packages/superset-ui-core/package.json
- pyproject.toml
- UPDATING.md
- superset/config.py
- RELEASING/release-notes-2-0/changelog.md
- CHANGELOG/2.1.0.md
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.
Footnotes
from superset.
For me the culprit package was Flask-Compress 1.15.
Rolling back Flask-Compress to 1.14 and removing zstandard solved the problem.
You can pip install pipdeptree
and then run pipdeptree -r -p zstandard
to see what depends on zstandard.
from superset.
Hi @jakubjosef thanks for reporting this, and for the research into the cause. I ran into the same issue and found that adding COMPRESS_REGISTER = False
into my superset_config.py file fixes it for me when developing locally. We'll look into either documenting this somewhere or fixing it more longer-term.
from superset.
@jakubjosef so that would be on a fresh install from pypi
as in pip install apache-superset
?
Doing a bit of guessing here, since all of our CI installs the pin packages in requirements/development.txt
, maybe the unpinned version of Superset has this issue? If that's the case it points towards:
- as a workaround, you leveraging docker images build on top of pinned deps, or using the pinned deps in your installation scripts
- for us, we could run some CI tests against a vanilla
pip install apache-superset
, so at least we know when an open dependency breaks a build - which would inform pin-pointing the issue and changing the version range for that dep
from superset.
Yes, in our install script we are using pip install apache-superset==4.0.0rc1
. I see 4.0.0 is now officially published, so we can try to use it, but I think we'll face the same issue eventually.
from superset.
but I think we'll face the same issue eventually
My suggestion would be either:
- use the base docker, which installs the pinned deps ahead of installing the apache-superset package
- fetch the requirements/base.txt from the repo (with the associated version tag you're trying to build as in
git checkout 4.0.0
) and pip install those pin deps ahead of installing the superset package (that has loose dependency ranges). At that point might as wellpip install -e .
to install from the repo as opposed to pypi, but should be same aspip install apache-superset==4.0.0
On our side, there's a question as to whether we should publish a more strict or "with depenencies pinned" version of the package to work around all this....
from superset.
I also encountered the same problem. After modifying config.py =>COMPRESS_REGISTER = False, the page no longer had strange symbols, but there were many resources on the page that failed to load; May I ask how I can solve this problem?
superset:3.1.3
python: 3.9.7
node: 16.20.2
npm: 8.19.4
from superset.
@Amylee520 We basically took a list of exact versions from another working machine (IIRC the command was pip freeze
) and use it as source of truth for pip on new device. Not an ideal solution but we were in bit time rush.
from superset.
@tyrius02 Thank you for identifying what exact package version is causing this problem, it can help others. We were not able to identify exact cause when we faced this problem.
from superset.
Related Issues (20)
- 50 - Deprecate the KV_STORE feature flag HOT 3
- [SIP-137] Can we limit a user to only read certain tables in the database connection? HOT 6
- SPAM
- Version 4.0.1: Unable to adjust the size of a chart in a dashboard when the chart touches the right edge of the dashboard HOT 4
- SPAM
- SPAM
- SPAM
- SPAM
- SPAM
- SPAM
- SPAM
- SPAM
- SPAM
- SPAM
- Default native filters values don't set correctly HOT 1
- Superset 4.0.1 - Exported CSV Contains Garbled Chinese Characters and Numbers HOT 4
- Metric datatype incorrect when swap dataset HOT 1
- It is proposed to add the feature of grouping like folders HOT 3
- TimeSeries Chart is showing Year for the January month HOT 5
- Storybook controls are out of date HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superset.