Getting 500 Internal Server Error while creating new Alert Destination

Redash 8.0.2.b37747 (deployed in Kubernetes with GitHub - getredash/redash: Make Your Company Data Driven. Connect to any data source, easily visualize, dashboard and share your data.)
I have a problem creating a new alert destination

First issue was - Redash showed me just “Loading” if I tried to open Alert Destinations page
I fixed it with ALTER TABLE notification_destinations ADD COLUMN options TEXT
( [Temporarily Fixed] Upgrade to Redash 9 failed with migrations and Alert Destinations are throwing internal server error )

But now if I try to create new alert destination, Redash shows me an error:
“The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.”

On the server`s console throws error

[2021-10-12 07:57:58,738 ERROR in app: Exception on /api/destinations [POST
Traceback (most recent call last):
File “/usr/local/lib/python2.7/site-packages/flask/app.py”, line 1612, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/local/lib/python2.7/site-packages/flask/app.py”, line 1598, in dispatch_request
return self.view_functions[rule.endpoint
File “/usr/local/lib/python2.7/site-packages/flask_restful/init.py”, line 477, in wrapper
resp = resource(*args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/flask_login/utils.py”, line 228, in decorated_view
return func(*args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/flask/views.py”, line 84, in view
return self.dispatch_request(*args, **kwargs)
File “/app/redash/handlers/base.py”, line 31, in dispatch_request
return super(BaseResource, self).dispatch_request(*args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/flask_restful/init.py”, line 587, in dispatch_request
resp = meth(*args, **kwargs)
File “/app/redash/permissions.py”, line 67, in decorated
return fn(*args, **kwargs)
File “/app/redash/handlers/destinations.py”, line 117, in post
abort(500)
File “/usr/local/lib/python2.7/site-packages/flask_restful/init.py”, line 31, in abort
original_flask_abort(http_status_code)
File “/usr/local/lib/python2.7/site-packages/werkzeug/exceptions.py”, line 646, in call
raise self.mapping[code(*args, **kwargs)
InternalServerError: 500: Internal Server Error

Meanwhile I’m able to update already created destinations…

looks like Redash is quite sensitive for table structures…
It was migration-related issue (ec2>kubernetes>v8>v10>v8)
Several tables were modified, but after rollback from v10 to v8 this factor causes issues time to time.

ALTER TABLE notification_destinations ADD COLUMN options TEXT;
ALTER TABLE notification_destinations DROP COLUMN encrypted_options;
helped

Issue fixed

This is a really good find. Thank you for sharing your solution.

I hope we can improve our story around K8S deployments. Right now I think the helm-chart repo is pinned to V8. That repo is not maintained by the core team. But I hope our K8S friends will get to use the cool features in V10 and forward soon.