abhishekindigg opened a new issue, #29577:
URL: https://github.com/apache/superset/issues/29577

   ### Bug description
   
   Hi,
   
   I have deployed superset on AWS EKS with latest helm chart which basically 
installs superset 4.0.1
   
   I'm getting this error despite setting `SECRET_KEY` in configOverrides
   
   ```
   configOverrides:
     secret: |
       SECRET_KEY = '3wWjdAKccUou1LYPsQS7YTvYbdPBfeMPKYc5eO+DadHC1Hv7jB2GA12f'
   ```
   All the pods are up and running,
   
   ```
   kubectl get pods -n prod-superset
   NAME                               READY   STATUS      RESTARTS   AGE
   superset-5fd785cbd4-9z7qx          1/1     Running     0          6m7s
   superset-5fd785cbd4-jrhfl          1/1     Running     0          3m29s
   superset-5fd785cbd4-rnxvb          1/1     Running     0          3m50s
   superset-init-db-zbvnb             0/1     Completed   0          6m6s
   superset-worker-555559455c-2kcbm   1/1     Running     0          6m7s
   superset-worker-555559455c-5887k   1/1     Running     0          5m31s
   ```
   
   But when I check pod logs, I get this,
   
   ```
   2024-07-12 17:50:44,313:ERROR:superset.views.base:The session is unavailable 
because no secret key was set.  Set the secret_key on the application to 
something unique and secret.
   Traceback (most recent call last):
     File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in 
full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in 
dispatch_request
       return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
     File 
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/security/views.py", 
line 633, in login
       return self.render_template(
     File 
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/baseviews.py", line 
342, in render_template
       return render_template(
     File "/usr/local/lib/python3.9/site-packages/flask/templating.py", line 
147, in render_template
       return _render(app, template, context)
     File "/usr/local/lib/python3.9/site-packages/flask/templating.py", line 
130, in _render
       rv = template.render(context)
     File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 
1301, in render
       self.environment.handle_exception()
     File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 
936, in handle_exception
       raise rewrite_traceback_stack(source=source)
     File 
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/templates/appbuilder/general/security/login_oauth.html",
 line 2, in top-level template code
       {% extends "appbuilder/base.html" %}
     File 
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/templates/appbuilder/base.html",
 line 1, in top-level template code
       {% extends base_template %}
     File "/app/superset/templates/superset/base.html", line 20, in top-level 
template code
       {% from 'superset/partials/asset_bundle.html' import css_bundle, 
js_bundle with context %}
     File "/app/superset/templates/appbuilder/baselayout.html", line 20, in 
top-level template code
       {% import 'appbuilder/baselib.html' as baselib %}
     File 
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/templates/appbuilder/init.html",
 line 42, in top-level template code
       {% block body %}
     File "/app/superset/templates/appbuilder/baselayout.html", line 23, in 
block 'body'
       {% include 'appbuilder/general/confirm.html' %}
     File 
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/templates/appbuilder/general/confirm.html",
 line 6, in top-level template code
       {{_('User confirmation needed')}}
     File "/usr/local/lib/python3.9/site-packages/jinja2/ext.py", line 167, in 
_gettext_alias
       return __context.call(__context.resolve("gettext"), *args, **kwargs)
     File "/usr/local/lib/python3.9/site-packages/jinja2/ext.py", line 173, in 
gettext
       rv = __context.call(func, __string)
     File "/usr/local/lib/python3.9/site-packages/flask_babel/__init__.py", 
line 110, in <lambda>
       lambda x: get_translations().ugettext(x),
     File "/usr/local/lib/python3.9/site-packages/flask_babel/__init__.py", 
line 221, in get_translations
       [get_locale()],
     File "/usr/local/lib/python3.9/site-packages/flask_babel/__init__.py", 
line 251, in get_locale
       rv = babel.locale_selector_func()
     File 
"/usr/local/lib/python3.9/site-packages/flask_appbuilder/babel/manager.py", 
line 62, in get_locale
       session["locale"] = self.babel_default_locale
     File "/usr/local/lib/python3.9/site-packages/flask/sessions.py", line 98, 
in _fail
       raise RuntimeError(
   RuntimeError: The session is unavailable because no secret key was set.  Set 
the secret_key on the application to something unique and secret.
   ```
   
   Now I got inside the pod to check if secret key exists. It is there.
   ```
   root@superset-5fd785cbd4-jrhfl:/app/pythonpath# cat superset_config.py | 
grep SECRET
   SECRET_KEY = '3wWjdAKccUou1LYPsQS7YTvYbdPBfeMPKYc5eO+DadHC1Hv7jBgGAQ2f'
   SECRET_KEY = '3wWjdAKccUou1LYPsQS7YTvYbdPBfeMPKYc5eO+DadHC1Hv7jBgGAQ2f'
   root@superset-5fd785cbd4-jrhfl:/app/pythonpath# 
   ```
   
   So what is the  issue ? I'm not able to figure it out.
   
   ### How to reproduce the bug
   
   1. Install superset with Helm chart.
   2. I modified frontend code and created a Docker image.
   3. I used that docker image url in helm chart and deployed in eks.
   4. It didn't work so I reverted to official superset image.
   5. So after reverting changed to previous one, I started seeing this error.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   4.0.1
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [X] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to