You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "marlomorales (via GitHub)" <gi...@apache.org> on 2023/02/07 09:12:43 UTC
[GitHub] [superset] marlomorales opened a new pull request, #23016: fix(embedded): successfully load embedded dashboard as expected
marlomorales opened a new pull request, #23016:
URL: https://github.com/apache/superset/pull/23016
### SUMMARY
(See associated issue below about the background of the issue)
Handle correctly the issue on the SQLA connector specifically composing the SQL WHERE clause.
Before:
* only checks the granularity then defaults to appending the filters to WHERE clause together with AND
After:
* aside from granularity check, we also check how many filters:
* if there's more than 1 filter, we append together with AND in the WHERE clause
* if there's only 1 filter, we append without AND in the WHERE clause
* no more default since if there's no WHERE clause it can be omitted
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
### TESTING INSTRUCTIONS
See associated issue
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [X] Has associated issue: Fixes #22949
--
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] villebro commented on pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-1424033032
@marlomorales I looked at the current code, and it's slightly unpythonic/messy. Here's a patch that cleans it up, passes the tests and may actually fix the issue at the same time (not sure). Can you try and see if it fixes your issue?
```patch
diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py
index 8be079bde..bd258fff3 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -1613,7 +1613,7 @@ class SqlaTable(Model, BaseDatasource): # pylint: disable=too-many-public-metho
database_id=self.database_id,
schema=self.schema,
)
- where_clause_and += [self.text(where)]
+ where_clause_and.append(self.text(where))
having = extras.get("having")
if having:
try:
@@ -1630,17 +1630,20 @@ class SqlaTable(Model, BaseDatasource): # pylint: disable=too-many-public-metho
database_id=self.database_id,
schema=self.schema,
)
- having_clause_and += [self.text(having)]
+ having_clause_and.append(self.text(having))
if apply_fetch_values_predicate and self.fetch_values_predicate:
- qry = qry.where(
+ where_clause_and.append(
self.get_fetch_values_predicate(template_processor=template_processor)
)
if granularity:
- qry = qry.where(and_(*(time_filters + where_clause_and)))
- else:
+ where_clause_and += time_filters
+
+ if where_clause_and:
qry = qry.where(and_(*where_clause_and))
- qry = qry.having(and_(*having_clause_and))
+
+ if having_clause_and:
+ qry = qry.having(and_(*having_clause_and))
self.make_orderby_compatible(select_exprs, orderby_exprs)
@@ -1680,7 +1683,7 @@ class SqlaTable(Model, BaseDatasource): # pylint: disable=too-many-public-metho
inner_groupby_exprs.append(inner)
inner_select_exprs.append(inner)
- inner_select_exprs += [inner_main_metric_expr]
+ inner_select_exprs.append(inner_main_metric_expr)
subq = select(inner_select_exprs).select_from(tbl)
inner_time_filter = []
```
Even if it doesn't fix it right away (I suspect I know what may be causing this), I think this is a better starting point for implementing the changes you need.
--
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] villebro commented on pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-1423774242
Thanks for this improvement @marlomorales - I think the change makes sense, but to future proof this against regressions, it would be great if we could add an integration test here, as I consider this fairly critical functionality that I'd hate to see break in the future due to incomplete test coverage. Let me know if you need help and I'll do my best to carve out some time to provide assistance.
--
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] villebro commented on pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-1425268664
> @villebro
> i was able to found out where the extra parentheses in WHERE clause
> it's from the `get_sqla_row_level_filters` method
> i've fixed it, now i'm able to see the embedded dashboard without any errors as expected
Awesome detective work! π΅οΈ Ok let me take a look...
--
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] marlomorales commented on pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "marlomorales (via GitHub)" <gi...@apache.org>.
marlomorales commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-1427474687
Yes please @villebro
Thanks a lot ππ½
On Mon, Feb 13, 2023 at 3:14 PM Ville Brofeldt ***@***.***>
wrote:
> @marlomorales <https://github.com/marlomorales> if you're ok with it, I
> can directly push those additional changes I suggested + a unit test to
> make sure the original problem goes away. LMKWYT.
>
> β
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/superset/pull/23016#issuecomment-1427457026>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AUXYIPWLDXITO4QMUIFFLALWXHNOJANCNFSM6AAAAAAUTWHAD4>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
--
Thanks!
______________________________________________________________
MARLO MORALES
*Senior Software Engineer*
--
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: [PR] fix(embedded): successfully load embedded dashboard as expected [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-2741794507
This has sat untouched in draft mode for quite a while, so we'll go ahead and close it. We welcome you to reopen it if you want to contribute the change. Thank you for your contribution nonetheless!
--
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] villebro commented on a diff in pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on code in PR #23016:
URL: https://github.com/apache/superset/pull/23016#discussion_r1102347481
##########
superset/connectors/sqla/models.py:
##########
@@ -1106,20 +1106,22 @@ def get_sqla_row_level_filters(
filter_groups: Dict[Union[int, str], List[TextClause]] = defaultdict(list)
try:
for filter_ in security_manager.get_rls_filters(self):
- clause = self.text(
- f"({template_processor.process_template(filter_.clause)})"
- )
- if filter_.group_key:
- filter_groups[filter_.group_key].append(clause)
- else:
- all_filters.append(clause)
+ if filter_.clause:
+ clause = self.text(
+ f"({template_processor.process_template(filter_.clause)})"
+ )
+ if filter_.group_key:
+ filter_groups[filter_.group_key].append(clause)
+ else:
+ all_filters.append(clause)
Review Comment:
Looking at `SupersetSecurityManager.get_rls_filters`, it states it should be returning `List[SqlaQuery]`. However, it appears to be returning `List[RowLevelSecurityFilter]`. So I believe that should also be fixed.
--
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: [PR] fix(embedded): successfully load embedded dashboard as expected [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed pull request #23016: fix(embedded): successfully load embedded dashboard as expected
URL: https://github.com/apache/superset/pull/23016
--
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] marlomorales commented on pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "marlomorales (via GitHub)" <gi...@apache.org>.
marlomorales commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-1425069936
@villebro still the same issue
```
Error: syntax error at or near ")"
LINE 4: WHERE ()
```
[Screenshot](https://drive.google.com/file/d/1detKrle1-qvBPBJfT-TU2y5HJBVfPgq3/view?usp=sharing)
--
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] villebro commented on pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-1427443446
> sorry @villebro iβm not on superset slack for now, iβm gonna use the forked version of superset as the fix is really needed by my company/organization
Ok. I'll do my best to help tracking down the source of this issue this week.
--
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] lilykuang commented on pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "lilykuang (via GitHub)" <gi...@apache.org>.
lilykuang commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-1421183904
thank you for opening the pr @marlomorales. I am not very familiar sql connector so tags a few committers to review
--
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] villebro commented on pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-1427457026
@marlomorales if you're ok with it, I can directly push those additional changes I suggested + a unit test to make sure the original problem goes away. LMKWYT.
--
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: [PR] fix(embedded): successfully load embedded dashboard as expected [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-1930908740
@marlomorales @villebro is there any interest in carrying this across the finish line, or should we let it go?
--
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] marlomorales commented on pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "marlomorales (via GitHub)" <gi...@apache.org>.
marlomorales commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-1421939855
@villebro @zhaoyongjie @betodealmeida @dpgaspar
please take a look into this as soon as you can. 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
[GitHub] [superset] marlomorales commented on pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "marlomorales (via GitHub)" <gi...@apache.org>.
marlomorales commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-1425291211
sorry @villebro iβm not on superset slack
for now, iβm gonna use the forked version of superset as the fix is really
needed by my company/organization
On Fri, Feb 10, 2023 at 2:57 PM Ville Brofeldt ***@***.***>
wrote:
> ***@***.**** commented on this pull request.
>
> Looking good, however, let's also fix the type in
> SupersetSecurityManager.get_rls_filters, as it's incorrectly typed.
> Please ping me on Slack if you need help, it should be a quick fix.
> ------------------------------
>
> In superset/connectors/sqla/models.py
> <https://github.com/apache/superset/pull/23016#discussion_r1102347481>:
>
> > - clause = self.text(
> - f"({template_processor.process_template(filter_.clause)})"
> - )
> - if filter_.group_key:
> - filter_groups[filter_.group_key].append(clause)
> - else:
> - all_filters.append(clause)
> + if filter_.clause:
> + clause = self.text(
> + f"({template_processor.process_template(filter_.clause)})"
> + )
> + if filter_.group_key:
> + filter_groups[filter_.group_key].append(clause)
> + else:
> + all_filters.append(clause)
>
> Looking at SupersetSecurityManager.get_rls_filters(self), it states it
> should be returning List[SqlaQuery]. However, it appears to be returning
> List[RowLevelSecurityFilter]. So I believe that should also be fixed.
>
> β
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/superset/pull/23016#pullrequestreview-1292487481>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AUXYIPQPQ3ZFZI4AQ4UB5MLWWXREVANCNFSM6AAAAAAUTWHAD4>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
--
Thanks!
______________________________________________________________
MARLO MORALES
*Senior Software Engineer*
--
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] marlomorales commented on pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "marlomorales (via GitHub)" <gi...@apache.org>.
marlomorales commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-1425122757
@villebro
was able to found out where the extra parentheses in WHERE clause
it's from the `get_sqla_row_level_filters` method
now i was able to see the embedded dashboard without any errors as expected
--
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] codecov[bot] commented on pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-1425274772
# [Codecov](https://codecov.io/gh/apache/superset/pull/23016?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#23016](https://codecov.io/gh/apache/superset/pull/23016?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ba7c019) into [master](https://codecov.io/gh/apache/superset/commit/efe6d22d4a9c789d4262f197d01709a820332cf0?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (efe6d22) will **decrease** coverage by `11.22%`.
> The diff coverage is `56.25%`.
```diff
@@ Coverage Diff @@
## master #23016 +/- ##
===========================================
- Coverage 67.45% 56.23% -11.22%
===========================================
Files 1878 1878
Lines 72140 72147 +7
Branches 7866 7866
===========================================
- Hits 48663 40575 -8088
- Misses 21458 29553 +8095
Partials 2019 2019
```
| Flag | Coverage Ξ | |
|---|---|---|
| hive | `?` | |
| mysql | `?` | |
| postgres | `?` | |
| presto | `52.61% <31.25%> (-0.01%)` | :arrow_down: |
| python | `58.85% <56.25%> (-23.32%)` | :arrow_down: |
| sqlite | `?` | |
| unit | `52.50% <37.50%> (-0.01%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/23016?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Ξ | |
|---|---|---|
| [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/23016?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `75.17% <56.25%> (-14.21%)` | :arrow_down: |
| [superset/utils/dashboard\_import\_export.py](https://codecov.io/gh/apache/superset/pull/23016?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ltcG9ydF9leHBvcnQucHk=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset/tags/core.py](https://codecov.io/gh/apache/superset/pull/23016?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdGFncy9jb3JlLnB5) | `4.54% <0.00%> (-95.46%)` | :arrow_down: |
| [superset/key\_value/commands/update.py](https://codecov.io/gh/apache/superset/pull/23016?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `0.00% <0.00%> (-90.91%)` | :arrow_down: |
| [superset/key\_value/commands/delete.py](https://codecov.io/gh/apache/superset/pull/23016?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL2RlbGV0ZS5weQ==) | `0.00% <0.00%> (-87.88%)` | :arrow_down: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/23016?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
| [superset/key\_value/commands/delete\_expired.py](https://codecov.io/gh/apache/superset/pull/23016?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL2RlbGV0ZV9leHBpcmVkLnB5) | `0.00% <0.00%> (-84.00%)` | :arrow_down: |
| [superset/dashboards/commands/importers/v0.py](https://codecov.io/gh/apache/superset/pull/23016?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy9pbXBvcnRlcnMvdjAucHk=) | `15.62% <0.00%> (-76.25%)` | :arrow_down: |
| [superset/datasets/commands/create.py](https://codecov.io/gh/apache/superset/pull/23016?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvY3JlYXRlLnB5) | `30.61% <0.00%> (-69.39%)` | :arrow_down: |
| [superset/datasets/commands/update.py](https://codecov.io/gh/apache/superset/pull/23016?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvdXBkYXRlLnB5) | `25.00% <0.00%> (-69.05%)` | :arrow_down: |
| ... and [286 more](https://codecov.io/gh/apache/superset/pull/23016?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: Weβre building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
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] villebro commented on a diff in pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on code in PR #23016:
URL: https://github.com/apache/superset/pull/23016#discussion_r1102347481
##########
superset/connectors/sqla/models.py:
##########
@@ -1106,20 +1106,22 @@ def get_sqla_row_level_filters(
filter_groups: Dict[Union[int, str], List[TextClause]] = defaultdict(list)
try:
for filter_ in security_manager.get_rls_filters(self):
- clause = self.text(
- f"({template_processor.process_template(filter_.clause)})"
- )
- if filter_.group_key:
- filter_groups[filter_.group_key].append(clause)
- else:
- all_filters.append(clause)
+ if filter_.clause:
+ clause = self.text(
+ f"({template_processor.process_template(filter_.clause)})"
+ )
+ if filter_.group_key:
+ filter_groups[filter_.group_key].append(clause)
+ else:
+ all_filters.append(clause)
Review Comment:
Looking at `SupersetSecurityManager.get_rls_filters(self)`, it states it should be returning `List[SqlaQuery]`. However, it appears to be returning `List[RowLevelSecurityFilter]`. So I believe that should also be fixed.
--
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] marlomorales commented on pull request #23016: fix(embedded): successfully load embedded dashboard as expected
Posted by "marlomorales (via GitHub)" <gi...@apache.org>.
marlomorales commented on PR #23016:
URL: https://github.com/apache/superset/pull/23016#issuecomment-1423778646
yes please @villebro πββοΈ
need assistance on this one, tbh, i'm not w/in the python ecosystem so it'll take time for me to add some integration tests and other needed stuffs to push through with the change/fix needed here
--
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