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

Use preview images after installing redash with script setup #6921

Open
ERAS14D opened this issue Apr 23, 2024 · 16 comments
Open

Use preview images after installing redash with script setup #6921

ERAS14D opened this issue Apr 23, 2024 · 16 comments

Comments

@ERAS14D
Copy link

ERAS14D commented Apr 23, 2024

Hello, I have installed redash few weeks ago running fine.

We are currently trying to integrate GA4 ( google analytic 4 ) to our redash instance but after doing som research i saw that it was impossible with the current images we are using.

On the main time I found that it was possible to solve by using other images like preview:24...Etc but when i change the images on my docker-compose file the containers are starting but remains unaccessible from browser

Anyone can provide further help like a tutorial to migrate from official images to dev or preview one ? I could not find them

Thanks

@justinclift
Copy link
Member

justinclift commented Apr 23, 2024

Ahhh. That sounds like your Redash database might have started out as a slightly older version, and hasn't been upgraded for the newer preview image.

The "How to upgrade" page here is probably what you need:

https://redash.io/help/open-source/admin-guide/how-to-upgrade

(ignore the version numbers on that page, those really need updating)

Be sure to back up your database + the matching environment file (/opt/redash/env) before doing that though, just in case something goes wrong.

Oh, the docker-compose [...] command on that page should probably say docker compose [...] instead too. No need for the hyphen (-) between docker and compose any more.


Try that out and let us know if it works? 😄

@justinclift
Copy link
Member

@ERAS14D Have you had a chance to look into that? 😄

@mirkan1
Copy link

mirkan1 commented Apr 28, 2024

What images are you talking about?

@justinclift
Copy link
Member

@mirkan1 Are you asking @ERAS14D or myself? 😄

@mirkan1
Copy link

mirkan1 commented Apr 28, 2024

I just couldnt understand the concept of issue here; Is it related to GA4 which I never used before or is it about default redash images?

@justinclift
Copy link
Member

It's probably that they're using an older version of Redash (like 10.x or even earlier), and may not have seen they need to run a manual database upgrade when they want to move that to a newer version. 😄

@mirkan1
Copy link

mirkan1 commented Apr 29, 2024

@justinclift where is this opt/redash folder supposed to be at on how-to-update? I tried several versions and non of them containing such folder;
Also docker-compose.yml will be turned into compose.yml on the next version
Also I did some changes you mentioned on your comment above

@justinclift
Copy link
Member

It's /opt/redash, not opt/redash. 😄

@justinclift
Copy link
Member

Also I did some changes you mentioned on your comment above

Awesome, I'll take a look shortly. 😄

@justinclift
Copy link
Member

@mirkan1 Yep, that looked good so it's been merged. 😄

@ERAS14D
Copy link
Author

ERAS14D commented May 1, 2024

Hello there and sorry for the late reply I was too busy to try
I will try to upgrade and put the newest preview version and keep you updated guys
Thanks for your help !

@ERAS14D
Copy link
Author

ERAS14D commented May 1, 2024

Tried the upgrade and got this

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2213, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python3.8/site-packages/werkzeug/middleware/proxy_fix.py", line 182, in __call__
    return self.app(environ, start_response)
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2193, in wsgi_app
    response = self.handle_exception(e)
  File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 298, in error_router
    return original_handler(e)
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 298, in error_router
    return original_handler(e)
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/local/lib/python3.8/site-packages/flask_limiter/extension.py", line 1191, in __inner
    R, flask.current_app.ensure_sync(cast(Callable[P, R], obj))(*a, **k)
  File "/app/redash/handlers/authentication.py", line 214, in login
    show_password_login=current_org.get_setting("auth_password_login_enabled"),
  File "/app/redash/models/organizations.py", line 69, in get_setting
    if key in self.settings.get("settings", {}):
AttributeError: 'str' object has no attribute 'get'
[2024-05-01 19:05:01,749][PID:12][INFO][werkzeug] - [01/May/2024 19:05:01] "GET /login?__debugger__=yes&cmd=resource&f=style.css HTTP/1.0" 304 -
[2024-05-01 19:05:01,754][PID:12][INFO][werkzeug - - [01/May/2024 19:05:01] "GET /login?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.0" 304 -
[2024-05-01 19:05:01,999][PID:12][INFO][werkzeug] - - [01/May/2024 19:05:01] "GET /login?__debugger__=yes&cmd=resource&f=console.png HTTP/1.0" 304 -

Let me explain i deployed redash using the setup script :
https://github.com/getredash/setup

Then I'm trying to update to the latest dev version redash/preview:24.04.0-dev-b8846825497.45 ( which handles GA4 )
I'm using machine image and new instances to trying the upgrade

I did not specify the --preview on the first launch which resulted in a deploy with version 8 ( realy old )
I followed the doc and got this error

Am I missing something guys ??

@ERAS14D
Copy link
Author

ERAS14D commented May 1, 2024

....

@justinclift
Copy link
Member

No worries, with a few more bits of back and forth discussion we can probably get this solved.

Just bear in mind that people are in different time zones, so it might take a few days to get there. 😉

That being said, do you still have a copy or backup of the version 8 Redash you were using?

I'm thinking it might turn out to be faster and simpler to export your data (queries, dashboards, etc) from that, and load them into a fresh new Redash preview instance.

But, that'll depend on how many queries, dashboards, users, and groups you have? Are you ok to share with us roughly how many there are of each? Doesn't need to be exact figures, just a rough count would be fine. 😄

Also, with the above error you're getting... which version of Redash is that error from?

@ERAS14D
Copy link
Author

ERAS14D commented May 2, 2024

Hello, yeah i forgot this point sorry we can communicate whenever you are available

We don't have a lot of data to be honest maybe 15 dashboard and same amount of users

I did not think of it the first time ( my mind kept thinking of doing an upgrade ) but yeah this can resolve the problem easily and in a minimum of time for our case

I was just wondering are you sure that if I install the preview version i would have access to the version 24 for example ?

For the version it's this docker image redash/preview:24.04.0-dev-b8846825497.45

@justinclift
Copy link
Member

justinclift commented May 2, 2024

The preview image is evolving a bit over time, as we're fixing bugs and adding new stuff to it. It's not perfect yet, but it's "pretty good" and will be fine for most people. 😄


k, now back to looking at your upgrade journey 😉 so far. You've started with Redash v8, then started the upgrade process to take that to version 9 first yes?

Did you then test if the updated-to-version-9 version of Redash works ok before then upgrading to version 10 (etc)?

Asking that because it kind of sounds like you might have tried upgrading directly from Redash version 8, straight to the preview release.

If you did try the big jump approach, and that's what didn't work out so well (?), then the right course of action will probably be to try the upgrade approach again jumping up only a single Redash release each time. eg from 8 -> 9, then test the resulting Redash, then 9 -> 10 + test the resulting Redash, then 10 -> 10.1 + test the resulting Redash, then 10.1 -> preview + test the resulting Redash.

There's more steps involved this way, but there's also a high chance everything will work smoothly and have a good result. In theory. 😉

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

No branches or pull requests

3 participants