Skip to content
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

Clean install issues with 2.1.0rc1 #23181

Closed
paulvanharen opened this issue Feb 24, 2023 · 6 comments
Closed

Clean install issues with 2.1.0rc1 #23181

paulvanharen opened this issue Feb 24, 2023 · 6 comments
Assignees
Labels
#bug Bug report

Comments

@paulvanharen
Copy link

paulvanharen commented Feb 24, 2023

After a clean install of the release candidate 2.1.0RC01, superset doesn't launch correctly.

How to reproduce the bug

#!/bin/bash

# Clean up old installation
rm -rf ~/.superset
cd ~/workspace/IoT2
rm -rf superset2.1

# Extract new installation
tar zxf ~/Downloads/apache-superset-2.1.0rc1-source.tar.gz 
mv apache-superset-2.1.0rc1/ superset2.1
cd superset2.1

# Create enviornment and install
python3.10 -m venv venv
. ./venv/bin/activate
pip install --upgrade pip 
pip install .

# Set up
superset db upgrade
export FLASK_APP=superset
superset fab create-admin
superset init

# Run 
superset run -p 8088 --with-threads --reload --debugger

Expected results

No errors nor major warnings during installation. When launching the welcome page at http://localhost:8088/superset/welcome/, a clean formatted page.

Actual results

  • pip install . is clean
  • superset db upgrade mentions that no PIL installation was found. This is easily fixed by adding pillow to the install requirements.
  • furthermore superset db upgrade also warns

superset2.1/venv/lib/python3.10/site-packages/flask_appbuilder/models/sqla/interface.py:67: SAWarning: relationship 'SqlaTable.slices' will copy column tables.id to column slices.datasource_id, which conflicts with relationship(s): 'Slice.table' (copies tables.id to slices.datasource_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. To silence this warning, add the parameter 'overlaps="table"' to the 'SqlaTable.slices' relationship. (Background on this error at: https://sqlalche.me/e/14/qzyx)

  • the same two warnings are raised during the superset fab create-admin and again for superset init
  • superset run gives again the same warning
  • Cleaning the browser cache and then loading the local superset welcome page yields a broken page - see screenshot
  • Furthermore, in the superset run log it is found that loading.gif is not found (HTTP 404). I found that the directory superset/static is empty where the same directory for superset version 2.0.1 (from Pypi) contains a well filled assets directory with images and stylesheets.

Screenshots

Screenshot_20230224_083253

Environment

  • browser type and version: Brave - latest version
  • superset version: 2.1.0rc1
  • python version: 3.9.16 as well as 3.10.6
  • node.js version: v12.22.9
@paulvanharen paulvanharen added the #bug Bug report label Feb 24, 2023
@eschutho
Copy link
Member

Hi @paulvanharen. Thank you for the report. Can you try running npm run build?

@paulvanharen
Copy link
Author

paulvanharen commented Feb 25, 2023

Hi @eschutho, I've tried installing npm to be able to run npm run build as per your suggestion, but I think I need some more guidance to make this work.
Running npm run build in the root of superset immediately returns, complaining that there is no 'package.json' file. Running in superset-frontend first alerts that cross-env is missing. After fixing this, npm starts building, producing a lot of warnings. The most concerning one appears to be the following:

[webpack-cli] /home/paul/workspace/IoT2/superset2.1/superset-frontend/tools/eslint-plugin-theme- 
colors/index.js:74
            const rawValue = node?.value?.raw;
                                  ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at ConfigArrayFactory._loadPlugin (/home/paul/workspace/IoT2/superset2.1/superset-frontend/node_modules/@eslint/eslintrc/lib/config-array-factory.js:1036:42)
    at /home/paul/workspace/IoT2/superset2.1/superset-frontend/node_modules/@eslint/eslintrc/lib/config-array-factory.js:908:33
    at Array.reduce (<anonymous>)

Unfortunately, at the end of this build and (re-) starting superset, the results remain the same. The superset page is broken and the static directory is empty.

npm has version 8.5.1.

@rusackas
Copy link
Member

rusackas commented Feb 27, 2023

cross-env is in the npm dev dependencies. The error you're showing there looks like some JS is not compiling right with babel/webpack (the syntax is perfectly fine as far as I see). Can you cd into superset-frontend, and then run npm ci followed by npm run build? Also, what OS are you running, out of curiosity?

@paulvanharen
Copy link
Author

Hi @rusackas, running npm ci followed by npm run build produces similar / the same results. From the output, I would guess that npm ci is embedded in npm run build.

A few things might be noteworthy:
I see tons of warnings like

71 warn EBADENGINE Unsupported engine {
71 warn EBADENGINE   package: '@lerna/add@6.1.0',
71 warn EBADENGINE   required: { node: '^14.15.0 || >=16.0.0' },
71 warn EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
71 warn EBADENGINE }

There are about 70 in total.

I've about 30 depreciation warnings including

debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
mathfn@1.2.0: Use cephes instead, for a more complete and well-tested module
uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
@babel/polyfill@7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
topojson@1.6.27: Use topojson-client, topojson-server or topojson-simplify directly.
svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
fontsource-fira-code@4.0.0: Package relocated. Please install and migrate to @fontsource/fira-code.
puppeteer@10.2.0: < 18.1.0 is no longer supported
deprecated core-js@1.2.7: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.

I also see the recommendation to run npm audit fix, which I did and which resulted in another series of issues.

My computer is running Ubuntu 22.04 LTS.

@eschutho
Copy link
Member

eschutho commented Jun 3, 2023

The warnings are expected. As long as you don't see any errors you should be fine. Does this doc better help outline these steps? #23199

@eschutho eschutho closed this as completed Jun 3, 2023
@Afsalmc
Copy link

Afsalmc commented Jan 3, 2024

@paulvanharen Did you find any solution ?
@eschutho Why close this without a resolution ?
Errors are still there and docs are not pointing out any workaround as of now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

No branches or pull requests

5 participants