-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
IndexError: string index out of range while upgrading from Redash 8 to 25 #7287
Comments
Details below ubuntu@ip-xx-xx-xx>:/opt/redash$ sudo docker compose run --rm server manage db upgrade[+] Creating 2/0✔ Container redash-postgres-1 Running 0.0s✔ Container redash-redis-1 Running 0.0s[+] Running 16/16✔ server 15 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 42.4s ✔ fd674058ff8f Pull complete 0.6s ✔ a1235d039a7d Pull complete 0.2s ✔ e17464c8c9fb Pull complete 0.4s ✔ f344618db07e Pull complete 0.3s ✔ 52fde642c283 Pull complete 0.5s ✔ bb1b0b22c91b Pull complete 3.3s ✔ 7f98ecde02c3 Pull complete 1.1s ✔ 1531fcd3a9ef Pull complete 0.8s ✔ 5dab1ec751d7 Pull complete 1.6s ✔ 6bfc3cbdba78 Pull complete 1.3s ✔ fc61b25deda2 Pull complete 1.6s ✔ c2c2fbe3af3f Pull complete 10.1s ✔ 815cebae4a01 Pull complete 1.9s ✔ 690d46dd1230 Pull complete 2.4s ✔ 022fa5b66d25 Pull complete 2.6s[2025-01-17 05:02:14,709][PID:1][INFO][root] Latest version: 10.1.0 (newer: False)[2025-01-17 05:02:15,222][PID:1][INFO][xmlschema] Resource 'XMLSchema.xsd' is already loaded[2025-01-17 05:02:15,985][PID:1][INFO][alembic.runtime.migration] Context impl PostgresqlImpl.[2025-01-17 05:02:15,985][PID:1][INFO][alembic.runtime.migration] Will assume transactional DDL.[2025-01-17 05:02:16,009][PID:1][INFO][alembic.runtime.migration] Running upgrade e5c7a4e2df4d -> d7d747033183, encrypt alert destinations[2025-01-17 05:02:16,035][PID:1][INFO][alembic.runtime.migration] Running upgrade e5c7a4e2df4d -> 0ec979123ba4, empty message[2025-01-17 05:02:16,080][PID:1][INFO][alembic.runtime.migration] Running upgrade 0ec979123ba4, d7d747033183 -> 89bc7873a3e0, fix_multiple_heads[2025-01-17 05:02:16,082][PID:1][INFO][alembic.runtime.migration] Running upgrade 89bc7873a3e0 -> fd4fc850d7ea, Convert user details to jsonb and move user profile image url into details column[2025-01-17 05:02:16,117][PID:1][INFO][alembic.runtime.migration] Running upgrade fd4fc850d7ea -> 1038c2174f5d, Make case insensitive hash of query text[2025-01-17 05:02:16,219][PID:1][INFO][alembic.runtime.migration] Running upgrade 1038c2174f5d -> 7ce5925f832b, create sqlalchemy_searchable expressions[2025-01-17 05:02:16,231][PID:1][INFO][alembic.runtime.migration] Running upgrade 7ce5925f832b -> 7205816877ec, change type of json fields from varchar to json[2025-01-17 05:02:16,691][PID:1][INFO][alembic.runtime.migration] Running upgrade 7205816877ec -> 9e8c841d1a30, fix_hashUpdating hash for query 60 from 11da15cb26e63a6e9afddcf36dbecd2b to 11da15cb26e63a6e9afddcf36dbecd2bTraceback (most recent call last): File "/app/manage.py", line 9, in manager() File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in call return self.main(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python3.10/site-packages/flask/cli.py", line 357, in decorator return __ctx.invoke(f, *args, **kwargs) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/flask_migrate/cli.py", line 134, in upgrade _upgrade(directory, revision, sql, tag, x_arg) File "/usr/local/lib/python3.10/site-packages/flask_migrate/init.py", line 95, in wrapped f(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/flask_migrate/init.py", line 280, in upgrade command.upgrade(config, revision, sql=sql, tag=tag) File "/usr/local/lib/python3.10/site-packages/alembic/command.py", line 403, in upgrade script.run_env() File "/usr/local/lib/python3.10/site-packages/alembic/script/base.py", line 583, in run_env util.load_python_file(self.dir, "env.py") File "/usr/local/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 95, in load_python_file module = load_module_py(module_id, path) File "/usr/local/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 113, in load_module_py spec.loader.exec_module(module) # type: ignore File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/app/migrations/env.py", line 93, in run_migrations_online() File "/app/migrations/env.py", line 85, in run_migrations_online context.run_migrations() File "", line 8, in run_migrations File "/usr/local/lib/python3.10/site-packages/alembic/runtime/environment.py", line 948, in run_migrations self.get_context().run_migrations(**kw) File "/usr/local/lib/python3.10/site-packages/alembic/runtime/migration.py", line 627, in run_migrations step.migration_fn(**kw) File "/app/migrations/versions/9e8c841d1a30_fix_hash.py", line 55, in upgrade new_hash = update_query_hash(record) File "/app/migrations/versions/9e8c841d1a30_fix_hash.py", line 26, in update_query_hash query_runner = get_query_runner(record['type'], {}) if record['type'] else BaseQueryRunner({}) File "/app/redash/query_runner/init.py", line 433, in get_query_runner return query_runner_class(configuration) File "/app/redash/query_runner/elasticsearch.py", line 95, in init if self.server_url[-1] == "/":IndexError: string index out of range |
I think this issue duplicated with the #7272 issue. If that's the case, this issue is currently being tracked for a resolution. |
To ensure efficient issue tracking, I am closing this issue. |
I have Redash image: redash/redash:8.0.0.b32245 and planning to upgrade it to image: redash/redash:25.1.0
Following the steps outlined here: https://redash.io/help/open-source/admin-guide/how-to-upgrade/
However, I am getting 'IndexError: string index out of range' when I run 'sudo docker compose run --rm server manage db upgrade' command. Any thoughts on how to fix this issue?
Originally posted by @productatvitrina in #7286
The text was updated successfully, but these errors were encountered: