-
Notifications
You must be signed in to change notification settings - Fork 26
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
OAuth doesn't work with import-assets command #309
Comments
Hey @Mast3rSensei, Could you try running the CLI command using the superset-cli --jwt-token $my_jwt http://localhost:8088/ import-assets --disable-jinja-templating --split [destination path] This would help confirming that your environment is working properly, and the only issue is the auth piece. |
You beautiful man @Vitor-Avila, you did it again! The use of the
Edit1: Sorry, just realized you already had a condition for the
Edit 2: I actually got another error because I had a dashboard with no |
Hey @Mast3rSensei, I'm glad you managed to get unblocked! Thanks for sharing your findings as well. In regards to "is it ok or at least expected for a dashboard to have no metadata sometimes?" that's a very tricky question. I believe that it's currently no longer possible/expected that dashboards don't have a minimum metadata. However, for older versions (or perhaps dashboards created in an older version that haven't been updated since) they might be in a "more flexible" configuration. Would you like to contribute your changes to the repo? We have a CLA now, so we can accept external contributions. The only requirement is that all changes must have test coverage. |
Hey @Vitor-Avila, Sure thing! Although this is unknown territory to me, I never contributed to an open source project before, so expect some rookie mistakes with my PR. But sure, as soon as I have some time, I'll push a fix. |
thanks, and no worries! 🙏 🙌 |
Hello everyone,
I managed to integrate Google OAuth with Superset, but I have a problem: I need to be able to import my assets (it's something we do often for Version Control reasons), but I'm not able to do it through the superset-cli sub-package inside the preset-cli package.
Now, before activating the OAuth I was not aware that Superset would've forced me to choose only one login method, so the first problem I had to solve was related to that. Considering that so far I always used simply the user name and password of an admin user to login to Superset via API, how the hell can I do the same now that I activated OAuth?
Fortunately I found a solution in this thread: the idea is to keep the auth type as OAuth, but create an admin through the command line that requires a password to login with
superset fab create-admin --username ${SUPERSET_ADMIN_USR} --firstname superset --lastname conf --email superset@localhost --password ${SUPERSET_DB_ADMIN_PWD}
. This should bypass the need of accessing through OAuth and let me keep my code unchanged and keep accessing the API via username and password.So far so good, and in fact, I can access the API if I for example call the database endpoint with a GET request. No error is returned. However, if I try instead to use the
import-assets
command using superset-cli, it returns aRecursionError
, due to this exception that is raised ad infinitum on the Superset logs after I call the command:My original command is
superset-cli -u ${SUPERSET_ADMIN_USR} -p ${SUPERSET_DB_ADMIN_PWD} http://localhost:8088/ import-assets --disable-jinja-templating --split [destination path]
Any idea how I can make this works?
The text was updated successfully, but these errors were encountered: