New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flask as dependancy #3252

Merged
merged 1 commit into from Aug 9, 2017

Conversation

Projects
None yet
3 participants
@Fokko
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls 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.

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

This comment has been minimized.

Show comment
Hide comment
@mistercrunch

mistercrunch Aug 8, 2017

Contributor

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?

Contributor

mistercrunch commented Aug 8, 2017

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

This comment has been minimized.

Show comment
Hide comment
@mistercrunch

mistercrunch Aug 9, 2017

Contributor

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

Contributor

mistercrunch commented Aug 9, 2017

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

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 69.311%
Details
@Fokko

This comment has been minimized.

Show comment
Hide comment
@Fokko

Fokko Aug 9, 2017

Contributor

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

Contributor

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 added a commit to graceguo-supercat/superset that referenced this pull request Aug 10, 2017

mistercrunch added a commit that referenced this pull request Aug 11, 2017

Explore view save modal spec (#3110)
* 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

dimaslv added a commit to dimaslv/superset that referenced this pull request Feb 2, 2018

dimaslv added a commit to dimaslv/superset that referenced this pull request Feb 2, 2018

Explore view save modal spec (apache#3110)
* 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' (apache#3254)

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

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

* Modernize SQLA pessimistic handling (apache#3256)

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

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

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

* cleaning up some templates

* Fix pylint issue

* import logging (apache#3264)

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

Recently in
apache@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 (apache#3252)

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

* Improve the chart type of Visualize in sqllab (apache#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 (apache#3266)

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

* [explore] Split large reducer logic in ExploreViewContainer (apache#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment