Skip to content

Conversation

@Fokko
Copy link
Contributor

@Fokko Fokko commented Aug 7, 2017

Hi guys,

I'm building a Docker image that will compile and install the Superset from the master branch. Because I'm building from a clean Ubuntu base, I get an error of a missing dependancy:

creating /usr/local/lib/python2.7/dist-packages/WTForms-2.1-py2.7.egg
Extracting WTForms-2.1-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding WTForms 2.1 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/WTForms-2.1-py2.7.egg
Searching for Flask
Downloading https://pypi.python.org/packages/ba/15/00a9693180f214225a2c0b1bb9077f3b0b21f2e86522cbba22e8ad6e570c/Flask-WTF-0.14.2.tar.gz#md5=586f50f233926cade42e3d744aca3e8f
Best match: Flask WTF-0.14.2
Processing Flask-WTF-0.14.2.tar.gz
Writing /tmp/easy_install-jIL1Fb/Flask-WTF-0.14.2/setup.cfg
Running Flask-WTF-0.14.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-jIL1Fb/Flask-WTF-0.14.2/egg-dist-tmp-lNE55d
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyo' found under directory 'tests'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files found matching 'docs/_themes/.git*'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
removing '/usr/local/lib/python2.7/dist-packages/Flask_WTF-0.14.2-py2.7.egg' (and everything under it)
creating /usr/local/lib/python2.7/dist-packages/Flask_WTF-0.14.2-py2.7.egg
Extracting Flask_WTF-0.14.2-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Flask-WTF 0.14.2 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/Flask_WTF-0.14.2-py2.7.egg
error: The 'Flask' distribution was not found and is required by flask-wtf, flask-testing, flask-script, flask-cache
The command '/bin/sh -c apt-get update && apt-get install -y $BUILD_DEPS $RUNTIME_DEPS && pip install --upgrade setuptools pip && npm install -g npm@'>=5.0.3' && git clone https://github.com/apache/incubator-superset.git $SUPERSET_HOME && cd $SUPERSET_HOME/superset/assets && npm install && npm run build && cd $SUPERSET_HOME && python setup.py install && apt-get remove -y $BUILD_DEPS && apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* && rm -rf ~/.npm/' returned a non-zero code: 1

By adding Flask explicitly, I'm able to build the image successfully.

Cheers, Fokko

@coveralls
Copy link

coveralls commented Aug 7, 2017

Coverage Status

Coverage remained the same at 69.311% when pulling d5eca0f on Fokko:hotfix-add-flask-as-dependency into f68189b on apache:master.

@mistercrunch
Copy link
Member

What command are you using to install Superset? pip install superset?

Flask gets installed through flask_appbuilder, which may specify a version range and I'd prefer let them specify it. Maybe the issue happens only if flask_wtf installs before flask_appbuilder?

@mistercrunch
Copy link
Member

Thought about this some more and I think it's a good thing to pin Flask in the context of Superset.

@mistercrunch mistercrunch merged commit 6da68ab into apache:master Aug 9, 2017
@Fokko
Copy link
Contributor Author

Fokko commented Aug 9, 2017

Hi Maxime,

Thanks for merging the PR. When looked online for similar issues, the closest one I can find is this one:
pallets/flask#1106
They solve it by including Flask>=0.10.1 as a dependancy so the flask_appbuilder can still decide on the version. Personally I would recommend to pin the version, this makes debugging easier because everyone is running the same version of Flask.

To get back to your question, I do not use pip install superset, but I build it from source as described:

apt-get update \
&& apt-get install -y npm git build-essential libssl-dev libffi-dev libsasl2-dev libldap2-dev nodejs-legacy python-dev python-pip \
&& pip install --upgrade setuptools pip \
&& npm install -g npm@'>=5.0.3' \
&& git clone https://github.com/Fokko/incubator-superset.git $SUPERSET_HOME \
&& cd $SUPERSET_HOME/superset/assets \
&& npm install \
&& npm run build \
&& cd $SUPERSET_HOME \
&& python setup.py install

This is happening in a clean Docker ubuntu image.

Cheers, Fokko

graceguo-supercat pushed a commit to graceguo-supercat/superset that referenced this pull request Aug 10, 2017
mistercrunch pushed a commit that referenced this pull request Aug 11, 2017
* split reducer logic for ExploreViewContainer

* fix saveModal component and unit tests

* revert changes in SaveModal_spec.
will make another commit just to improve test coverage for SaveModal component.

* improve test coverage for explore view components:
- SaveModal component
- URLShortLinkButton

* remove comment-out code

* [bugfix] wrong 'Cant have overlap between Series and Breakdowns' (#3254)

* [explore] make edit datasource a basic link (#3244)

* Relying on FAB for font-awesome.min.css (#3261)

* Modernize SQLA pessimistic handling (#3256)

Looks like SQLAlchemy has redefined the best practice around
pessimistic connection handling.

* [webpack] break CSS and JS files while webpackin' (#3262)

* [webpack] break CSS and JS files while webpackin'

* cleaning up some templates

* Fix pylint issue

* import logging (#3264)

* [bugfix] preserve order in groupby (#3268)

Recently in
4c3313b
I introduced an issue where the order of groupby fields might change.

This addresses this issue and will preserve ordering.

* Explicitly add Flask as dependancy (#3252)

* Use sane Celery defaults to prevent tasks from being delayed (#3267)

* Improve the chart type of Visualize in sqllab (#3241)

* Improve the chart type of Visualize in sqllab & Add some css & Fix the link address in the navbar

* add vizTypes filter

* Set default ports Druid (#3266)

For Druid set the default port for the broker and coordinator.

* [explore] Split large reducer logic in ExploreViewContainer (#3088)

* split reducer logic for ExploreViewContainer

* fix saveModal component and unit tests

* revert changes in SaveModal_spec.
will make another commit just to improve test coverage for SaveModal component.

* remove comment-out code

* fix merge confilicts
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.19.1 First shipped in 0.19.1 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.19.1 First shipped in 0.19.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants