You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/05/19 11:53:01 UTC
[GitHub] [superset] ticktockhouse opened a new issue, #20131: ENABLE_TEMPLATE_PROCESSING feature flag apparently not working
ticktockhouse opened a new issue, #20131:
URL: https://github.com/apache/superset/issues/20131
#### How to reproduce the bug
Running superset in docker-compose, as per: https://github.com/apache/superset/blob/master/docker-compose-non-dev.yml
Run this query against my DB with the `ENABLE_TEMPLATE_PROCESSING` feature flag set to true. The query is:
```
select {{current_user_id()}} my_userid;
```
NB: This syntax works on preset.io
I have tried adding:
```
FEATURE_FLAGS = { "ENABLE_TEMPLATE_PROCESSING": True, }
```
in both `[superset_config.py](https://github.com/apache/superset/blob/master/docker/pythonpath_dev/superset_config.py)` and/or in `docker/pythonpath_dev/superset_config_docker.py`
### Expected results
Query results
### Actual results
I get this error:
```
PostgreSQL Error
Please check your query for syntax errors at or near "{". Then, try running your query again.
This may be triggered by:
Issue 1030 - The query has a syntax error.
```
Associated trace in log:
```
superset_app | Query 113: <class 'psycopg2.errors.SyntaxError'>
superset_app | Traceback (most recent call last):
superset_app | File "/app/superset/sql_lab.py", line 273, in execute_sql_statement
superset_app | db_engine_spec.execute(cursor, sql, async_=True)
superset_app | File "/app/superset/db_engine_specs/base.py", line 1260, in execute
superset_app | raise cls.get_dbapi_mapped_exception(ex)
superset_app | File "/app/superset/db_engine_specs/base.py", line 1258, in execute
superset_app | cursor.execute(query)
superset_app | psycopg2.errors.SyntaxError: syntax error at or near "{"
superset_app | LINE 1: select {{current_user_id()}} my_userid
```
### Environment
(please complete the following information):
- browser type and version:
- superset version: 0.0.0dev (?)
- python version: 3.8
- node.js version: `node -v`
- any feature flags active:
Supposedly `ENABLE_TEMPLATE_PROCESSING`, but it seems like it isn't...
--
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: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] ENABLE_TEMPLATE_PROCESSING feature flag apparently not working [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #20131:
URL: https://github.com/apache/superset/issues/20131#issuecomment-1936449474
Sounds like this Issue is all resolved... and very stale if not :) Closing. Thanks!
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] ENABLE_TEMPLATE_PROCESSING feature flag apparently not working [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #20131: ENABLE_TEMPLATE_PROCESSING feature flag apparently not working
URL: https://github.com/apache/superset/issues/20131
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] dpgaspar commented on issue #20131: ENABLE_TEMPLATE_PROCESSING feature flag apparently not working
Posted by GitBox <gi...@apache.org>.
dpgaspar commented on issue #20131:
URL: https://github.com/apache/superset/issues/20131#issuecomment-1138363293
I was not able to reproduce the issue, executing:
```
select {{ current_user_id() }} my_userid
```
or
```
select {{current_user_id()}} my_userid
```
on SQLLab executed successfully
There may be something wrong with your config, can you please do the following steps to troubleshoot:
- exec into your superset app container (if using this repo docker-compose, `docker exec -it superset_app bash`
- on bash execute: flask shell
- Inside flask shell execute:
``` python
from superset.extensions import feature_flag_manager
feature_flag_manager.is_feature_enabled("ENABLE_TEMPLATE_PROCESSING")
```
- Confirm that it's `True`
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] horatiucherebetiu commented on issue #20131: ENABLE_TEMPLATE_PROCESSING feature flag apparently not working
Posted by GitBox <gi...@apache.org>.
horatiucherebetiu commented on issue #20131:
URL: https://github.com/apache/superset/issues/20131#issuecomment-1190235231
I changed the next file(I copied the file locally edited and then copied back it to the docker container):
- container: superset_app
- file: /app/docker/pythonpath_dev/superset_config.py
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] rusackas commented on issue #20131: ENABLE_TEMPLATE_PROCESSING feature flag apparently not working
Posted by GitBox <gi...@apache.org>.
rusackas commented on issue #20131:
URL: https://github.com/apache/superset/issues/20131#issuecomment-1137424867
@dpgaspar know anyone who might be able to take a look at this one?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org