Re: [I] Superset can't access non-development environments [superset]

2024-05-29 Thread via GitHub


kainchow commented on issue #28707:
URL: https://github.com/apache/superset/issues/28707#issuecomment-2138730546

   4.0.1 worked for me, but 4.0.1rc not


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Superset can't access non-development environments [superset]

2024-05-29 Thread via GitHub


kainchow closed issue #28707: Superset can't access non-development environments
URL: https://github.com/apache/superset/issues/28707


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Dataset access [superset]

2024-05-29 Thread via GitHub


dosubot[bot] commented on issue #28775:
URL: https://github.com/apache/superset/issues/28775#issuecomment-2138698170

   
   To include permissions for dashboards for the gamma role or assign 
additional permissions to allow access to dashboards in Superset version 3.1.3, 
you can modify the permissions for the "Gamma" role. Here is an example of how 
you can ensure that the "Gamma" role has the necessary permissions to access 
dashboards:
   
   ```python
   def test_gamma_permissions(self):
   gamma_perm_set = set()
   for perm in security_manager.find_role("Gamma").permissions:
   gamma_perm_set.add((perm.permission.name, perm.view_menu.name))
   
   # Ensure the Gamma role has the necessary permissions for dashboards
   self.assert_can_all("Dashboard", gamma_perm_set)
   self.assert_can_read("Dataset", gamma_perm_set)
   self.assert_can_all("Chart", gamma_perm_set)
   
   self.assertIn(("can_csv", "Superset"), gamma_perm_set)
   self.assertIn(("can_dashboard", "Superset"), gamma_perm_set)
   self.assertIn(("can_explore", "Superset"), gamma_perm_set)
   self.assertIn(("can_share_chart", "Superset"), gamma_perm_set)
   self.assertIn(("can_share_dashboard", "Superset"), gamma_perm_set)
   self.assertIn(("can_explore_json", "Superset"), gamma_perm_set)
   self.assertIn(("can_userinfo", "UserDBModelView"), gamma_perm_set)
   self.assertIn(("can_view_chart_as_table", "Dashboard"), gamma_perm_set)
   self.assertIn(("can_view_query", "Dashboard"), gamma_perm_set)
   ```
   
   This code ensures that the "Gamma" role has the necessary permissions to 
access and interact with dashboards. The `assert_can_all` method checks that 
the role has both read and write permissions for the "Dashboard" view. 
Additionally, it verifies that the role has other related permissions such as 
`can_csv`, `can_dashboard`, `can_explore`, etc. 
[[1]](https://github.com/apache/superset/blob/master/tests/integration_tests/security_tests.py).
   
   Additionally, you can use the Superset frontend to assign roles to 
dashboards directly. The `PropertiesModal` component in the Superset frontend 
allows you to manage roles and owners for a dashboard. Here is an example of 
how you can use the `PropertiesModal` to assign roles:
   
   ```tsx
   return (
 <>
   
 
   {t('Access')}
 
   
   
 
   
 
 loadAccessOptions('owners', input, page, pageSize)
   }
   value={handleOwnersSelectValue()}
 />
   
   
 {t(
   'Owners is a list of users who can alter the dashboard. 
Searchable by name or username.',
 )}
   
 
 
   
 
 loadAccessOptions('roles', input, page, pageSize)
   }
   value={handleRolesSelectValue()}
 />
   
   
 {t(
   'Roles is a list which defines access to the dashboard. Granting 
a role access to a dashboard will bypass dataset level checks. If no roles are 
defined, regular access permissions apply.',
 )}
   
 
   
   
 
   
 
   
 
   );
   ```
   
   This component allows you to assign roles to a dashboard, which will bypass 
dataset level checks and grant the specified roles access to the dashboard 
[[2]](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx).
   
   Additionally, you can use utility functions to check and manage permissions 
programmatically. For example, the `userHasPermission` function can be used to 
verify if a user has a specific permission:
   
   ```ts
   export function userHasPermission(
 user: UserWithPermissionsAndRoles | UndefinedUser,
 viewName: string,
 permissionName: string,
   ) {
 return (
   isUserAdmin(user) ||
   (isUserWithPermissionsAndRoles(user) &&
 Object.values(user.roles || {})
   .flat()
   .some(
 permissionView =>
   permissionView[0] === permissionName &&
   permissionView[1] === viewName,
   ))
 );
   }
   ```
   
   This function checks if the user has the specified permission for a given 
view, considering both admin roles and specific permissions assigned to the 
user's roles 
[[3]](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/util/permissionUtils.ts).
   
   The integration tests in 
`tests/integration_tests/dashboards/security/security_rbac_tests.py` provide 
further examples of how role-based access control (RBAC) is implemented and 
tested in Superset. For instance, the `TestDashboardRoleBasedSecurity` class 
includes tests that verify access permissions for different roles, ensuring 
that only authorized users can access specific 

Re: [PR] feat: add Current time-range options for time filter [superset]

2024-05-29 Thread via GitHub


github-actions[bot] commented on PR #28637:
URL: https://github.com/apache/superset/pull/28637#issuecomment-2138694745

   @rusackas Ephemeral environment spinning up at http://18.236.146.162:8080. 
Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping 
and startup.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Dataset access [superset]

2024-05-29 Thread via GitHub


Zarrina1 commented on issue #28775:
URL: https://github.com/apache/superset/issues/28775#issuecomment-2138692128

   How to include permissions for dashboards then ?


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Dataset access [superset]

2024-05-29 Thread via GitHub


dosubot[bot] commented on issue #28775:
URL: https://github.com/apache/superset/issues/28775#issuecomment-2138687901

   
   The gamma role in Superset version 3.1.3 does not have the necessary 
permissions to access dashboards, even if they have access to the underlying 
datasets. The gamma role is restricted to read-only access for datasets and 
datasources, and does not include permissions for dashboards. This is why the 
gamma user can see the dataset in the Dataset folder but not the related 
dashboards.
   
   To resolve this, you may need to assign additional permissions to the gamma 
role or consider using a different role that has the necessary dashboard access 
permissions 
[[1]](https://github.com/apache/superset/blob/master/superset/security/manager.py)[[2]](https://github.com/apache/superset/blob/master/tests/integration_tests/security_tests.py)[[3]](https://github.com/apache/superset/blob/master/tests/integration_tests/dashboards/security/security_dataset_tests.py)[[4]](https://github.com/apache/superset/blob/master/tests/integration_tests/dashboard_tests.py).
   
   
   
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[I] Dataset access [superset]

2024-05-29 Thread via GitHub


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

   ### Bug description
   
   I have an issue while giving access to gamma role on particular dataset 
.Sometimes when I give access on datasource ,gamma user can see created 
charts/dashboards where this dataset was used as source and this situation is 
what I need .But when I give access on another dataset using the same method 
--(datasource access on [Cluster].[dataset]) ,user is not able to see related 
dashboards (but there are) ,user can only see this dataset in Dataset folder.
   
   ### How to reproduce the bug
   
   1.Go to add role 
   2.Give datasource access on [Schema].[dataset]
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   3.1.3
   
   ### Python version
   
   Not applicable
   
   ### Node version
   
   I don't know
   
   ### 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: notifications-unsubscr...@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] feat: add Current time-range options for time filter [superset]

2024-05-29 Thread via GitHub


rusackas commented on PR #28637:
URL: https://github.com/apache/superset/pull/28637#issuecomment-2138684998

   /testenv up


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[PR] feat(echarts-pie): add string template support for labels [superset]

2024-05-29 Thread via GitHub


hexcafe opened a new pull request, #28774:
URL: https://github.com/apache/superset/pull/28774

   
   
   ### SUMMARY
   
   Currently, we support several static label types:
   - key
   - value
   - percent
   - key_value
   - key_percent
   - key_value_percent
   - value_percent
   
   Providing a dynamic way for users to customize labels could be a great and 
innovative feature, making our pie charts more useful.
   
   We have introduced a new label type called `template` to support this 
feature. Users can customize the label by writing a string template. The string 
template supports the following variables:
   - `{name}` the name of a data item
   - `{value}` the value of a data item, formatted with number format option
   - `{percent}` the percentage of a data item, formatted with  number formatter
   
   Additionally, for ECharts compatibility, the following variables are 
supported:
   - `{a}` series name.
   - `{b}` the name of a data item, unformatted
   - `{c}` the value of a data item, unformatted
   - `{d}` percentage, unformatted
   
   `\n` is supported to represent a new line.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Formatted variables:
   https://github.com/apache/superset/assets/157834442/5e58b76e-4fc7-4f7e-a108-0a666027bdf2;>
   
   
   ECharts compatible variables:
   https://github.com/apache/superset/assets/157834442/e5b432f7-3360-4ff0-bc0c-644d871566ad;>
   
   
   ### TESTING INSTRUCTIONS
   
   
   ### ADDITIONAL INFORMATION
   
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
 - [ ] Migration is atomic, supports rollback & is backwards-compatible
 - [ ] Confirm DB migration upgrade and downgrade tested
 - [ ] Runtime estimates and downtime expectations provided
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Login shows endless loading [superset]

2024-05-29 Thread via GitHub


datkieu007 commented on issue #28617:
URL: https://github.com/apache/superset/issues/28617#issuecomment-2138669283

   I have same issue. I deploy superset on ec2 aws. Then access with chrome in 
ubuntu is successfully but chrome 125 in Window is still error. 
   
![Screenshot_5](https://github.com/apache/superset/assets/128342863/c3ee78ad-d144-4bc1-a3e9-4e949055c75f)
   `
   

https://superset:8088/superset/welcome/; jslog="Link; context: request; track: 
click" style="border: none; background: transparent; margin: 0px; padding: 0px; 
cursor: pointer;"> GET 
https://superset:8088/superset/welcome/ 
net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)
     | signin | @ | :8088/login/:178
   -- | -- | -- | --
     | (anonymous) | @ | :8088/login/:183
   
   
   
   `


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: remove sl_ tables [superset]

2024-05-29 Thread via GitHub


mistercrunch merged PR #28704:
URL: https://github.com/apache/superset/pull/28704


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: remove sl_ tables [superset]

2024-05-29 Thread via GitHub


mistercrunch commented on PR #28704:
URL: https://github.com/apache/superset/pull/28704#issuecomment-2138539326

   Could always revert or find inspiration here. But feels good to simplify the 
erd in the meantime


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix(Mixed Chart Filter Control): Allow delete condition for `adhoc_filters_b` [superset]

2024-05-29 Thread via GitHub


eschutho commented on PR #28771:
URL: https://github.com/apache/superset/pull/28771#issuecomment-2138521764

   @rtexelm can you add a small test for this, too? 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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix(Mixed Chart Filter Control): Allow delete condition for `adhoc_filters_b` [superset]

2024-05-29 Thread via GitHub


Antonio-RiveroMartnez commented on code in PR #28771:
URL: https://github.com/apache/superset/pull/28771#discussion_r1619621676


##
superset-frontend/src/explore/components/ControlPanelsContainer.tsx:
##
@@ -485,7 +485,7 @@ export const ControlPanelsContainer = (props: 
ControlPanelsContainerProps) => {
 ? baseDescription(exploreState, controls[name], chart)
 : baseDescription;
 
-if (name === 'adhoc_filters') {
+if (name.startsWith('adhoc_filters')) {

Review Comment:
   nit: is it guaranteed that the filter starts with this? why not using 
`includes` for example?



-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix(Mixed Chart Filter Control): Allow delete condition for `adhoc_filters_b` [superset]

2024-05-29 Thread via GitHub


Antonio-RiveroMartnez commented on code in PR #28771:
URL: https://github.com/apache/superset/pull/28771#discussion_r1619621676


##
superset-frontend/src/explore/components/ControlPanelsContainer.tsx:
##
@@ -485,7 +485,7 @@ export const ControlPanelsContainer = (props: 
ControlPanelsContainerProps) => {
 ? baseDescription(exploreState, controls[name], chart)
 : baseDescription;
 
-if (name === 'adhoc_filters') {
+if (name.startsWith('adhoc_filters')) {

Review Comment:
   is it guaranteed that the filter starts with this? why not using `includes` 
for example?



-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] feat: bake translations as part of the build processes [superset]

2024-05-29 Thread via GitHub


mistercrunch merged PR #28483:
URL: https://github.com/apache/superset/pull/28483


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix(Dashboard row): Reveal resize handle underneath droppable component [superset]

2024-05-29 Thread via GitHub


github-actions[bot] commented on PR #28746:
URL: https://github.com/apache/superset/pull/28746#issuecomment-2138427288

   Ephemeral environment shutdown and build artifacts deleted.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix(Dashboard row): Reveal resize handle underneath droppable component [superset]

2024-05-29 Thread via GitHub


rtexelm closed pull request #28746: fix(Dashboard row): Reveal resize handle 
underneath droppable component
URL: https://github.com/apache/superset/pull/28746


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix(Dashboard row): Reveal resize handle underneath droppable component [superset]

2024-05-29 Thread via GitHub


justinpark commented on PR #28746:
URL: https://github.com/apache/superset/pull/28746#issuecomment-2138421177

   @rtexelm I created a new PR that fixes the issue while retaining the display 
of the last drop zone's position.
   (fyi - The solution ensures that the position only appears during dragging, 
which resolves the problem.)


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[PR] fix(dashboard): unable to resize due to the overlapped droptarget [superset]

2024-05-29 Thread via GitHub


justinpark opened a new pull request, #28772:
URL: https://github.com/apache/superset/pull/28772

   ### SUMMARY
   This commit fixes the resizing issues on last item in #28746 and #28395 by 
applying the inset location only while dragging.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before:
   
   ![ChartResize-ezgif com-optimize 
(1)](https://github.com/apache/superset/assets/92495987/dcc4b1ce-d6b6-4a27-aa7f-1c0671a3dbdd)
   
   After:
   
   
https://github.com/apache/superset/assets/1392866/47128359-f69b-4cf9-a2f3-db4b3d2e6f21
   
   
   ### TESTING INSTRUCTIONS
   Extend a widget to the entire width, then resize it again to narrow it down.
   
   ### ADDITIONAL INFORMATION
   
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
 - [ ] Migration is atomic, supports rollback & is backwards-compatible
 - [ ] Confirm DB migration upgrade and downgrade tested
 - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[PR] fix(Mixed Chart Filter Control): Allow delete condition for `adhoc_filters_b` [superset]

2024-05-29 Thread via GitHub


rtexelm opened a new pull request, #28771:
URL: https://github.com/apache/superset/pull/28771

   
   
   ### SUMMARY
   
   This is meant to fix a bug that would prevent the deletion of filters from 
`Query B` in the control panel of a mixed chart.
   The condition to run the `canDelete` function for a filter previously only 
allowed for `adhoc_filters` as a valid value but the mixed chart uses 
`adhoc_filters_b` for the `Query B` group. This change should allow any string 
starting with `adhoc_filters` to be checked for deletion conditions.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   B:
   ![filters_old-ezgif 
com-optimize](https://github.com/apache/superset/assets/92495987/cfa9c76e-e516-4e5b-bd9a-f365ebf65cce)
   A:
   ![filters_new-ezgif 
com-optimize](https://github.com/apache/superset/assets/92495987/8472c0eb-64a3-4a01-a2e3-c9da0a204ea6)
   
   
   ### TESTING INSTRUCTIONS
   
   
   1. Create a Mixed Chart
   2. Add a filter to Query B
   3. Delete filter
   4. Delete last remaining temporal filter to test warning if is displayed
   
   ### ADDITIONAL INFORMATION
   
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
 - [ ] Migration is atomic, supports rollback & is backwards-compatible
 - [ ] Confirm DB migration upgrade and downgrade tested
 - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] How to change Big Number CSS to be like that? [superset]

2024-05-29 Thread via GitHub


Nikomahal commented on issue #8314:
URL: https://github.com/apache/superset/issues/8314#issuecomment-2138377180

   So I am asking in 2024 with v 3.1.1. how do we do this with CSS?  I 
particularly want my value to be centered


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Installing error [superset]

2024-05-29 Thread via GitHub


michaelritsema commented on issue #28374:
URL: https://github.com/apache/superset/issues/28374#issuecomment-2138350171

   I finally got it to work with giving Docker more memory as well. It used 
16.31 GB at its peak for me


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[PR] feat: impersonate with email prefix [superset]

2024-05-29 Thread via GitHub


betodealmeida opened a new pull request, #28770:
URL: https://github.com/apache/superset/pull/28770

   
   
   ### SUMMARY
   
   
   This PR adds a new feature flag, `IMPERSONATE_WITH_EMAIL_PREFIX`. When the 
flag is on (default is off) the user impersonation functionality will use the 
email prefix as the username, instead of the actual username.
   
   This is useful for deployments using OAuth2 for login, where the username 
might be something like:
   
   ```
   > SELECT username, email FROM ab_user;
   google-oauth2|633391720998176487074, b...@example.org
   ```
   
   With the feature flag on the impersonation would use `beto` as the username 
passed to the database.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   
   N/A
   
   ### TESTING INSTRUCTIONS
   
   
   Added unit tests.
   
   ### ADDITIONAL INFORMATION
   
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
 - [ ] Migration is atomic, supports rollback & is backwards-compatible
 - [ ] Confirm DB migration upgrade and downgrade tested
 - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Reuse/Migrate users to use SSO [superset]

2024-05-29 Thread via GitHub


scarby commented on issue #21273:
URL: https://github.com/apache/superset/issues/21273#issuecomment-2138319745

   @rusackas this is still an issue with superset 4.0.1
   
   In my case i'm looking at how to sync roles between our internal application 
database and apache superset. In this scenario it would be nice to be able to 
pre-create the user via the superset API and attach the correct roles based on 
the users Org unit, then when the user logs in via OIDC it would be useful to 
update the user with the user_id from oidc, instead superset fails when trying 
to insert a user with a duplicate e-mail address.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore(revert): "add listener to repaint on visibility change for canvas" [superset]

2024-05-29 Thread via GitHub


eschutho merged PR #28654:
URL: https://github.com/apache/superset/pull/28654


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix: do not close database modal on mask click [superset]

2024-05-29 Thread via GitHub


eschutho merged PR #28750:
URL: https://github.com/apache/superset/pull/28750


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] BUG: Can't flush None value found in collection Role.permissions [superset]

2024-05-29 Thread via GitHub


rusackas commented on issue #27896:
URL: https://github.com/apache/superset/issues/27896#issuecomment-2138241914

   @geido (or anyone else) — any ideas what the right move is to get closure 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I]  Problems creating rows and columns in the superset. [superset]

2024-05-29 Thread via GitHub


rusackas commented on issue #28699:
URL: https://github.com/apache/superset/issues/28699#issuecomment-2138225054

   Do you mean in the dashboard editor, like you're not able to drag and drop 
the layout elements for rows or columns?
   
   
![image](https://github.com/apache/superset/assets/812905/c8da5df6-a358-4c87-a733-8a599b686d76)
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Global Aysnc queries doesn't work with Athena [superset]

2024-05-29 Thread via GitHub


villebro commented on issue #25827:
URL: https://github.com/apache/superset/issues/25827#issuecomment-2138221572

   Is there a reason the `DATA_CACHE_CONFIG` is using `SupersetMetastoreCache`, 
and not `RedisCache` like the other caches in the config?


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] feat: Adds the ECharts Histogram chart [superset]

2024-05-29 Thread via GitHub


mistercrunch commented on PR #28652:
URL: https://github.com/apache/superset/pull/28652#issuecomment-2138197307

   
![200w](https://github.com/apache/superset/assets/487433/df6c7dda-59cc-456e-9fd8-e8c858f7bb9f)
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: add unique constraint to tagged_objects [superset]

2024-05-29 Thread via GitHub


mistercrunch commented on PR #26654:
URL: https://github.com/apache/superset/pull/26654#issuecomment-2138188101

   Can someone with the issue try this DRAFT solution? 
https://github.com/apache/superset/pull/28769


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix: address tag-related deletion issues raised in #26654 [superset]

2024-05-29 Thread via GitHub


request-info[bot] commented on PR #28769:
URL: https://github.com/apache/superset/pull/28769#issuecomment-2138187256

   We would appreciate it if you could provide us with more info about this 
issue/pr! Please do not leave the `title` or `description` empty.
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[PR] fix: address tag-related deletion issues raised in #26654 [superset]

2024-05-29 Thread via GitHub


mistercrunch opened a new pull request, #28769:
URL: https://github.com/apache/superset/pull/28769

   (no comment)


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: add unique constraint to tagged_objects [superset]

2024-05-29 Thread via GitHub


mistercrunch commented on PR #26654:
URL: https://github.com/apache/superset/pull/26654#issuecomment-2138176199

   I wasn't able to recreate the issue (tried to associate a tag to all the 
objects I could, and then tried deleting dashboards after that, hoping to hit 
the same issue).
   
   BUT, here's one idea I'd recommend trying, promoting the object_type filter 
to the `primaryjoin`, as in 
   ```
   tags = relationship(
   "Tag",
   overlaps="objects,tag,tags,tags",
   secondary="tagged_object",
   primaryjoin=f"and_(Dashboard.id == TaggedObject.object_id, 
TaggedObject.object_type == 'dashboard')",
   secondaryjoin="and_(TaggedObject.tag_id == Tag.id)",
   )
   ```
   I think it's worth giving it a shot in your environment.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: add unique constraint to tagged_objects [superset]

2024-05-29 Thread via GitHub


mistercrunch commented on PR #26654:
URL: https://github.com/apache/superset/pull/26654#issuecomment-2138163134

   actually nevermind the relationship is defined well on the other side:
   ```python
   class Dashboard(AuditMixinNullable, ImportExportMixin, Model):
   {{ ... }}
   tags = relationship(
   "Tag",
   overlaps="objects,tag,tags,tags",
   secondary="tagged_object",
   primaryjoin=f"and_(Dashboard.id == TaggedObject.object_id)",
   secondaryjoin="and_(TaggedObject.tag_id == Tag.id, 
TaggedObject.object_type == 'dashboard')",
   )
   ```


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] [Bug] Unable to edit mail list of existing alert & reports [superset]

2024-05-29 Thread via GitHub


sfirke closed issue #28709: [Bug] Unable to edit mail list of existing alert & 
reports
URL: https://github.com/apache/superset/issues/28709


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] [Bug] Unable to edit mail list of existing alert & reports [superset]

2024-05-29 Thread via GitHub


sfirke commented on issue #28709:
URL: https://github.com/apache/superset/issues/28709#issuecomment-2138154323

   I believe this is a duplicate of 
https://github.com/apache/superset/issues/28149 which was fixed in 
https://github.com/apache/superset/pull/28409. The next release -- either 4.1.0 
or 4.0.2 -- should have this fix incorporated.
   
   If you believe this is different than the issue I linked, please feel free 
to comment and I'll reopen.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Can not specify recipient for slack or email for Superset Reports [superset]

2024-05-29 Thread via GitHub


sfirke commented on issue #28712:
URL: https://github.com/apache/superset/issues/28712#issuecomment-2138151628

   Are you all talking about #28149 which was fixed in #28409?  Or is this 
something different?


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Add button grayed out even tough all fields are filled [superset]

2024-05-29 Thread via GitHub


sfirke closed issue #28758: Add button grayed out even tough all fields are 
filled 
URL: https://github.com/apache/superset/issues/28758


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Add button grayed out even tough all fields are filled [superset]

2024-05-29 Thread via GitHub


sfirke commented on issue #28758:
URL: https://github.com/apache/superset/issues/28758#issuecomment-2138148258

   This is a duplicate of #28149 which was fixed in #28409.  The next release 
-- either 4.1.0 or 4.0.2 -- should have this fix incorporated.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Problem Exporting Charts as Diagram [superset]

2024-05-29 Thread via GitHub


rusackas commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-2138137219

   Seems to be an issue in Safari too. 


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: remove ipython from development dependencies [superset]

2024-05-29 Thread via GitHub


mistercrunch commented on PR #28703:
URL: https://github.com/apache/superset/pull/28703#issuecomment-2138110987

   One more thought it with segmentation in `requirements/` we can have 
different level of rigor for freshness for different files. Likely I'll set up 
supersetbot in different ways for `base.in` VS `development.in`


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: remove ipython from development dependencies [superset]

2024-05-29 Thread via GitHub


mistercrunch commented on PR #28703:
URL: https://github.com/apache/superset/pull/28703#issuecomment-2138106585

   Yes for this particular one the "likely hood to be used" vs "dependency 
burden" isn't great. Currently the criteria is more or less "commonly used by 
humans and/or CI for development workflows".
   
   Now that we have a workflow to upgrade things (supersetbot as a 
pip-compile-multi-aware dependabot replacement), it seems reasonable / 
manageable if we wanted to bring back more segmentation/complexity under 
`requirements/` if we wanted to.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Customize loading spinner position and appereance [superset]

2024-05-29 Thread via GitHub


rusackas commented on issue #28739:
URL: https://github.com/apache/superset/issues/28739#issuecomment-2138102788

   All of the things you're asking for here could be contributed in a PR as 
feature additions (positioning improvements, additional classes needed for CSS, 
or even a customizable path in the config for a custom image, as we do in with 
the app logo). I'll move this to an Ideas thread, since it belongs there more 
so than as an Issue/bug.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Customize loading spinner position and appereance [superset]

2024-05-29 Thread via GitHub


rusackas closed issue #28739: Customize loading spinner position and appereance
URL: https://github.com/apache/superset/issues/28739


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix: spell error analagous -> analogous [superset]

2024-05-29 Thread via GitHub


codecov[bot] commented on PR #27930:
URL: https://github.com/apache/superset/pull/27930#issuecomment-2138098953

   ## 
[Codecov](https://app.codecov.io/gh/apache/superset/pull/27930?dropdown=coverage=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 64.57%. Comparing base 
[(`76d897e`)](https://app.codecov.io/gh/apache/superset/commit/76d897eaa2f9e137102bc194c2e3109c29d0348f?dropdown=coverage=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 to head 
[(`1ce8796`)](https://app.codecov.io/gh/apache/superset/commit/1ce87965d5ec73838f41c6b07606b72b779dfff3?dropdown=coverage=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   > Report is 242 commits behind head on master.
   
   
   Additional details and impacted files
   
   
   ```diff
   @@Coverage Diff @@
   ##   master   #27930  +/-   ##
   ==
   + Coverage   60.48%   64.57%   +4.08% 
   ==
 Files1931  522-1409 
 Lines   7623637491   -38745 
 Branches 85680-8568 
   ==
   - Hits4611424208   -21906 
   + Misses  2801713283   -14734 
   + Partials 21050-2105 
   ```
   
   | 
[Flag](https://app.codecov.io/gh/apache/superset/pull/27930/flags?src=pr=flags_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[hive](https://app.codecov.io/gh/apache/superset/pull/27930/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `49.12% <ø> (-0.04%)` | :arrow_down: |
   | 
[javascript](https://app.codecov.io/gh/apache/superset/pull/27930/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `?` | |
   | 
[presto](https://app.codecov.io/gh/apache/superset/pull/27930/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `53.67% <ø> (-0.13%)` | :arrow_down: |
   | 
[python](https://app.codecov.io/gh/apache/superset/pull/27930/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `64.57% <ø> (+1.08%)` | :arrow_up: |
   | 
[unit](https://app.codecov.io/gh/apache/superset/pull/27930/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `58.97% <ø> (+1.34%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/superset/pull/27930?dropdown=coverage=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: remove duplicate code in `SqlaTable` [superset]

2024-05-29 Thread via GitHub


betodealmeida merged PR #28752:
URL: https://github.com/apache/superset/pull/28752


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix(reports): Update the element class to wait for when taking a screenshot [superset]

2024-05-29 Thread via GitHub


rusackas merged PR #28745:
URL: https://github.com/apache/superset/pull/28745


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix(sqllab): Sort db selector options by the API order [superset]

2024-05-29 Thread via GitHub


justinpark merged PR #28749:
URL: https://github.com/apache/superset/pull/28749


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Where to find superset.log file? [superset]

2024-05-29 Thread via GitHub


JoanSebasMartinez commented on issue #8169:
URL: https://github.com/apache/superset/issues/8169#issuecomment-2137971900

   I have the same issue with the log, this is my config.py: 
   
   ENABLE_TIME_ROTATE = True
   TIME_ROTATE_LOG_LEVEL = logging.INFO
   FILENAME = os.path.join(DATA_DIR, "superset.log")
   ROLLOVER = "midnight"
   INTERVAL = 1
   BACKUP_COUNT = 30
   
   After restarting superset it doesn't generate the superset.log file
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Typo in IBM DB2 image reference in README.md [superset]

2024-05-29 Thread via GitHub


rusackas closed issue #28764: Typo in IBM DB2 image reference in README.md
URL: https://github.com/apache/superset/issues/28764


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix(docs): fix url typo to fix a broken image [superset]

2024-05-29 Thread via GitHub


rusackas merged PR #28765:
URL: https://github.com/apache/superset/pull/28765


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] superset fab list-users return username, email, role but not firstname, lastname, active [superset]

2024-05-29 Thread via GitHub


rusackas commented on issue #28691:
URL: https://github.com/apache/superset/issues/28691#issuecomment-2137947935

   @dpgaspar might know if this is a bug or intentional by design for some 
reason.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Datasource access [superset]

2024-05-29 Thread via GitHub


rusackas commented on issue #28760:
URL: https://github.com/apache/superset/issues/28760#issuecomment-2137944489

   I hope the AI comments are helpful, but I'm going to go ahead and close this 
out since we no longer support Superset <3.1. I *think* you can continue the 
bot talk as long as you'd like, but I'd also encourage you join 
[slack](http://bit.ly/join-superset-slack) and see if others there are able to 
help, perhaps in the `#customizing-superset` channel.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Datasource access [superset]

2024-05-29 Thread via GitHub


rusackas closed issue #28760: Datasource access
URL: https://github.com/apache/superset/issues/28760


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: add unique constraint to tagged_objects [superset]

2024-05-29 Thread via GitHub


mistercrunch commented on PR #26654:
URL: https://github.com/apache/superset/pull/26654#issuecomment-2137929403

   Thinking about this, I think I understand the issue better now, and it's not 
the same issue as the one I tackled in this PR
   
   Looking simply at this:
   ```python
   class TaggedObject(Model, AuditMixinNullable):
   """An association between an object and a tag."""
   
   __tablename__ = "tagged_object"
   id = Column(Integer, primary_key=True)
   tag_id = Column(Integer, ForeignKey("tag.id"))
   object_id = Column(
   Integer,
   ForeignKey("dashboards.id"),
   ForeignKey("slices.id"),
   ForeignKey("saved_query.id"),
   )
   object_type = Column(Enum(ObjectType))
   
   tag = relationship("Tag", back_populates="objects", overlaps="tags")
   ```
   there's nothing that clarifies the nature of the relationship being 
dependent on object_type. For sqlalchemy to properly cascade deletes here from 
dashboard or other object type, is has to apply a condition on object_type, 
which I'm guessing it doesn't. I really can't given that semantically we don't 
really tell it as we defined the model.
   
   In terms of solutions, there's either:
   - do some sqlalchemy kungfu to model/clarify the nature of the relationship 
do that cascade delete work as expected, this requires digging a bit deeper 
into sqlaclehmy semantics and seeing what's possible there
   - improve the DAOs / commands to delete tags proactively BEFORE deleting the 
objects, which means the delete CASCADE is effectively a no-op
   
   I think option #1 seems best AFAIC, if possible. 


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: bump python 'holidays' lib from 0.25 to 0.49 [superset]

2024-05-29 Thread via GitHub


john-bodley commented on PR #28747:
URL: https://github.com/apache/superset/pull/28747#issuecomment-2137927167

   @mistercrunch it would be good to determine if the issue in 
https://github.com/apache/superset/pull/25017 has been resolved.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: bump python 'holidays' lib from 0.25 to 0.49 [superset]

2024-05-29 Thread via GitHub


john-bodley commented on code in PR #28747:
URL: https://github.com/apache/superset/pull/28747#discussion_r1619246857


##
pyproject.toml:
##
@@ -57,7 +57,7 @@ dependencies = [
 "geopy",
 "gunicorn>=22.0.0; sys_platform != 'win32'",
 "hashids>=1.3.1, <2",
-"holidays>=0.25, <0.26",
+"holidays>=0.25",

Review Comment:
   Should we bump the lower bound and also place an upper bound of `1.0.0` as 
well?



-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: bump python 'holidays' lib from 0.25 to 0.49 [superset]

2024-05-29 Thread via GitHub


john-bodley commented on code in PR #28747:
URL: https://github.com/apache/superset/pull/28747#discussion_r1619246857


##
pyproject.toml:
##
@@ -57,7 +57,7 @@ dependencies = [
 "geopy",
 "gunicorn>=22.0.0; sys_platform != 'win32'",
 "hashids>=1.3.1, <2",
-"holidays>=0.25, <0.26",
+"holidays>=0.25",

Review Comment:
   Should we place an upper bound of `1.0.0` as well?



-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: updated Dutch translations [superset]

2024-05-29 Thread via GitHub


rusackas merged PR #28710:
URL: https://github.com/apache/superset/pull/28710


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: remove sl_ tables [superset]

2024-05-29 Thread via GitHub


john-bodley commented on PR #28704:
URL: https://github.com/apache/superset/pull/28704#issuecomment-2137912570

   Adding @betodealmeida as a reviewer as he was the original author of said 
logic.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: remove ipython from development dependencies [superset]

2024-05-29 Thread via GitHub


john-bodley commented on PR #28703:
URL: https://github.com/apache/superset/pull/28703#issuecomment-2137911407

   I thought development dependencies were there to help aid development. Maybe 
it's worth explicitly mentioning in the documentation what are viable 
development dependencies.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix: Workaround for Pandas.DataFrame.to_csv bug [superset]

2024-05-29 Thread via GitHub


john-bodley commented on code in PR #28755:
URL: https://github.com/apache/superset/pull/28755#discussion_r1619163911


##
superset/utils/csv.py:
##
@@ -49,10 +49,6 @@ def escape_value(value: str) -> str:
 is_negative_number = negative_number_re.match(value) is not None
 
 if needs_escaping and not is_negative_number:
-# Escape pipe to be extra safe as this

Review Comment:
   This is now handled via the `escapechar` character in the 
`pandas.DataFrame.to_csv` method.



-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix(sqllab): invalid sorting order on db selector [superset]

2024-05-29 Thread via GitHub


michael-s-molina commented on PR #28749:
URL: https://github.com/apache/superset/pull/28749#issuecomment-2137796725

   @justinpark Could you also update the PR description to say that the 
objective is to sort by the API order?


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix(sqllab): invalid sorting order on db selector [superset]

2024-05-29 Thread via GitHub


justinpark commented on PR #28749:
URL: https://github.com/apache/superset/pull/28749#issuecomment-2137783537

   > justinpark if you look at the default 
[DEFAULT_SORT_COMPARATOR](https://github.com/apache/superset/blob/07b2449bd777cf04a266f1de3d72af6874b9c305/superset-frontend/src/components/Select/constants.ts#L30C14-L30C37)
 implementation, you can see that it will sort items alphabetically if `label` 
is of type `string`. In this case, it's not sorting alphabetically because 
`label` is being set to a React component 
[here](https://github.com/apache/superset/blob/07b2449bd777cf04a266f1de3d72af6874b9c305/superset-frontend/src/components/DatabaseSelector/index.tsx#L195)
 instead of using `customLabel` for that purpose. If you set `label` to 
`database_name` and `customLabel` to the React component, you'll get the 
desired behavior.
   
   You are right, but I think that if the API that includes the actual sorting 
items is implemented, we would want the results to be sorted according to the 
API. Also, relying on client-side sorting can lead to inconsistencies, 
especially when handling paginated results, so I believe it is better to follow 
the API's results.
   
   Additionally, I have optimized the code to use the suggested order field.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Gauge chart interval bounds and colors not working properly when added to a dashboard [superset]

2024-05-29 Thread via GitHub


dosubot[bot] commented on issue #28766:
URL: https://github.com/apache/superset/issues/28766#issuecomment-2137778979

   
   @rodrigo-l-santos-alb Olá! I'm here to help you with any issues you're 
experiencing. Let's take a look at what's going on with the gauge chart.
   
   
   To address the issue where the gauge chart sometimes displays incorrect 
colors and interval bounds when added to a dashboard in Superset, you need to 
ensure that the `getIntervalBoundsAndColors` function correctly parses and 
normalizes the interval bounds and colors. Here is the relevant code snippet 
that handles this:
   
   ```ts
   export const getIntervalBoundsAndColors = (
 intervals: string,
 intervalColorIndices: string,
 colorFn: CategoricalColorScale,
 min: number,
 max: number,
   ): Array<[number, string]> => {
 let intervalBoundsNonNormalized;
 let intervalColorIndicesArray;
 try {
   intervalBoundsNonNormalized = parseNumbersList(intervals, ',');
   intervalColorIndicesArray = parseNumbersList(intervalColorIndices, ',');
 } catch (error) {
   intervalBoundsNonNormalized = [] as number[];
   intervalColorIndicesArray = [] as number[];
 }
   
 const intervalBounds = intervalBoundsNonNormalized.map(
   bound => (bound - min) / (max - min),
 );
 const intervalColors = intervalColorIndicesArray.map(
   ind => colorFn.colors[(ind - 1) % colorFn.colors.length],
 );
   
 return intervalBounds.map((val, idx) => {
   const color = intervalColors[idx];
   return [val, color || colorFn.colors[idx]];
 });
   };
   ```
   
   Ensure that the `intervals` and `intervalColorIndices` strings are correctly 
formatted and passed to this function. If the issue persists, verify that the 
`colorFn` and `CategoricalColorScale` are correctly initialized and contain the 
expected color values.
   
   Additionally, you can refer to the test cases in `transformProps.test.ts` to 
ensure that the `getIntervalBoundsAndColors` function is working as expected. 
Here is an example test case:
   
   ```ts
   describe('getIntervalBoundsAndColors', () => {
 it('should generate correct interval bounds and colors', () => {
   const colorFn = CategoricalColorNamespace.getScale('supersetColors' as 
string);
   expect(getIntervalBoundsAndColors('', '', colorFn, 0, 10)).toEqual([]);
   expect(getIntervalBoundsAndColors('4, 10', '1, 2', colorFn, 0, 
10)).toEqual([
 [0.4, '#1f77b4'],
 [1, '#ff7f0e'],
   ]);
   expect(getIntervalBoundsAndColors('4, 8, 10', '9, 8, 7', colorFn, 0, 
10)).toEqual([
 [0.4, '#bcbd22'],
 [0.8, '#7f7f7f'],
 [1, '#e377c2'],
   ]);
   expect(getIntervalBoundsAndColors('4, 10', '1, 2', colorFn, 2, 
10)).toEqual([
 [0.25, '#1f77b4'],
 [1, '#ff7f0e'],
   ]);
   expect(getIntervalBoundsAndColors('-4, 0', '1, 2', colorFn, -10, 
0)).toEqual([
 [0.6, '#1f77b4'],
 [1, '#ff7f0e'],
   ]);
   expect(getIntervalBoundsAndColors('-4, -2', '1, 2', colorFn, -10, 
-2)).toEqual([
 [0.75, '#1f77b4'],
 [1, '#ff7f0e'],
   ]);
 });
   });
   ```
   
   These tests ensure that the function correctly handles various interval and 
color index inputs, providing confidence that the function works as intended.
   
   Moreover, ensure that the control panel configuration for the gauge chart in 
`controlPanel.tsx` is correctly set up. Specifically, check the `intervals` and 
`interval_color_indices` controls:
   
   ```tsx
   {
 name: 'intervals',
 config: {
   type: 'TextControl',
   label: t('Interval bounds'),
   description: t(
 'Comma-separated interval bounds, e.g. 2,4,5 for intervals 0-2, 2-4 
and 4-5. Last number should match the value provided for MAX.',
   ),
   renderTrigger: true,
   default: DEFAULT_FORM_DATA.intervals,
 },
   },
   {
 name: 'interval_color_indices',
 config: {
   type: 'TextControl',
   label: t('Interval colors'),
   description: t(
 'Comma-separated color picks for the intervals, e.g. 1,2,4. Integers 
denote colors from the chosen color scheme and are 1-indexed. Length must be 
matching that of interval bounds.',
   ),
   renderTrigger: true,
   default: DEFAULT_FORM_DATA.intervalColorIndices,
 },
   },
   ```
   
   Ensure that these controls are correctly configured and that the user inputs 
are properly validated and passed to the `getIntervalBoundsAndColors` function 
[[1]](https://github.com/apache/superset/blob/master/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/transformProps.ts)[[2]](https://github.com/apache/superset/blob/master/superset-frontend/plugins/plugin-chart-echarts/test/Gauge/transformProps.test.ts)[[3]](https://github.com/apache/superset/blob/master/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/controlPanel.tsx).
   
   
   
   
   
   
    Details
   
   
   

Re: [I] Import is not working: An error occurred while importing dashboard: Import dashboard failed for an unknown reason [superset]

2024-05-29 Thread via GitHub


dosubot[bot] commented on issue #19222:
URL: https://github.com/apache/superset/issues/19222#issuecomment-2137760898

   
   @rusackas Hello! I'm here to help you with any bugs, questions, or 
contributions while you wait for a human maintainer. Feel free to ask me 
anything. [Dosu](https://dosu.dev)
   
   
   The error you're encountering during the dashboard import process in Apache 
Superset is likely due to issues with the `filter_scopes` in the dashboard's 
metadata. Specifically, the error `KeyError: 580` indicates that the import 
process is trying to access a key in the `filter_scopes` dictionary that 
doesn't exist.
   
   To resolve this issue, you can try the following steps:
   
   1. **Check the `filter_scopes` in the Exported File**:
  - Ensure that the `filter_scopes` in the exported dashboard file are 
correctly defined and do not reference any non-existent keys.
   
   2. **Use the `ImportDashboardsCommand` Class**:
  - The `ImportDashboardsCommand` class in Superset handles the import 
process and ensures that the dashboard metadata and position references are 
correctly mapped to the new IDs. This class also handles the conversion of 
filter scopes and other necessary adjustments.
   
   Here is a relevant code snippet from the `ImportDashboardsCommand` class 
that shows how it handles the import process:
   
   ```python
   class ImportDashboardsCommand(ImportModelsCommand):
   """Import dashboards"""
   
   dao = DashboardDAO
   model_name = "dashboard"
   prefix = "dashboards/"
   schemas: dict[str, Schema] = {
   "charts/": ImportV1ChartSchema(),
   "dashboards/": ImportV1DashboardSchema(),
   "datasets/": ImportV1DatasetSchema(),
   "databases/": ImportV1DatabaseSchema(),
   }
   import_error = DashboardImportError
   
   @staticmethod
   def _import(configs: dict[str, Any], overwrite: bool = False) -> None:
   # discover charts and datasets associated with dashboards
   chart_uuids: set[str] = set()
   dataset_uuids: set[str] = set()
   for file_name, config in configs.items():
   if file_name.startswith("dashboards/"):
   chart_uuids.update(find_chart_uuids(config["position"]))
   dataset_uuids.update(
   find_native_filter_datasets(config.get("metadata", {}))
   )
   
   # discover datasets associated with charts
   for file_name, config in configs.items():
   if file_name.startswith("charts/") and config["uuid"] in 
chart_uuids:
   dataset_uuids.add(config["dataset_uuid"])
   
   # discover databases associated with datasets
   database_uuids: set[str] = set()
   for file_name, config in configs.items():
   if file_name.startswith("datasets/") and config["uuid"] in 
dataset_uuids:
   database_uuids.add(config["database_uuid"])
   
   # import related databases
   database_ids: dict[str, int] = {}
   for file_name, config in configs.items():
   if file_name.startswith("databases/") and config["uuid"] in 
database_uuids:
   database = import_database(config, overwrite=False)
   database_ids[str(database.uuid)] = database.id
   
   # import datasets with the correct parent ref
   dataset_info: dict[str, dict[str, Any]] = {}
   for file_name, config in configs.items():
   if (
   file_name.startswith("datasets/")
   and config["database_uuid"] in database_ids
   ):
   config["database_id"] = database_ids[config["database_uuid"]]
   dataset = import_dataset(config, overwrite=False)
   dataset_info[str(dataset.uuid)] = {
   "datasource_id": dataset.id,
   "datasource_type": dataset.datasource_type,
   "datasource_name": dataset.table_name,
   }
   
   # import charts with the correct parent ref
   charts = []
   chart_ids: dict[str, int] = {}
   for file_name, config in configs.items():
   if (
   file_name.startswith("charts/")
   and config["dataset_uuid"] in dataset_info
   ):
   # update datasource id, type, and name
   dataset_dict = dataset_info[config["dataset_uuid"]]
   config.update(dataset_dict)
   dataset_uid = 
f"{dataset_dict['datasource_id']}__{dataset_dict['datasource_type']}"
   config["params"].update({"datasource": dataset_uid})
   if "query_context" in config:
   config["query_context"] = None
   
   chart = import_chart(config, overwrite=False)
   charts.append(chart)
 

Re: [I] Typo in IBM DB2 image reference in README.md [superset]

2024-05-29 Thread via GitHub


rusackas commented on issue #28764:
URL: https://github.com/apache/superset/issues/28764#issuecomment-2137759691

   Thanks for reporting this. Opened a PR to fix it. For once, it might've been 
easier to open a PR than an issue. Please feel free to correct anything like 
this that you come across in the future. Thanks again in any case.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[I] Gauge chart interval bounds and colors not working properly when added to a dashboard [superset]

2024-05-29 Thread via GitHub


rodrigo-l-santos-alb opened a new issue, #28766:
URL: https://github.com/apache/superset/issues/28766

   ### Bug description
   
   I have created a gauge chart with interval bounds and interval colors 
defined as the following picture, the color scheme defined is the Superset 
Colors color scheme.
   
   
![image](https://github.com/apache/superset/assets/127980665/4441b2a6-450f-48c9-b374-a44b3bc05b05)
   
   
When I add the chart to a dashboard, and access that dashboard, sometimes 
the colors and interval bounds aren't correctly displayed (see screenshot 
bellow).
   
   
![image](https://github.com/apache/superset/assets/127980665/907b3b13-350e-4d1b-94c3-41c47a7eb2cf)
   
   Note: the dashboard is also set to use the Superset Colors scheme.
   
   
   ### How to reproduce the bug
   
   1. Create a gauge chart.
   2. Define interval bounds and interval colors.
   3. Add chart to a dashboard.
   4. Go to the dashboard.
   5. Sometimes colors are correct when accessing the dashboard and sometimes 
they are not correct, however try to refresh the page and the colors change 
after refresh.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   3.1.3
   
   ### Python version
   
   3.9
   
   ### Node version
   
   Not applicable
   
   ### 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: notifications-unsubscr...@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[PR] fix(docs): fix url typo to fix a broken image [superset]

2024-05-29 Thread via GitHub


rusackas opened a new pull request, #28765:
URL: https://github.com/apache/superset/pull/28765

   
   
   ### SUMMARY
   
   Title says it all! Fixes https://github.com/apache/superset/issues/28764
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   
   ### TESTING INSTRUCTIONS
   
   
   ### ADDITIONAL INFORMATION
   
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
 - [ ] Migration is atomic, supports rollback & is backwards-compatible
 - [ ] Confirm DB migration upgrade and downgrade tested
 - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] feat: Adds the ECharts Histogram chart [superset]

2024-05-29 Thread via GitHub


rusackas commented on PR #28652:
URL: https://github.com/apache/superset/pull/28652#issuecomment-2137744601

   https://media0.giphy.com/media/DPznISmq0hLRQqG71g/giphy.gif"/>


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Import is not working: An error occurred while importing dashboard: Import dashboard failed for an unknown reason [superset]

2024-05-29 Thread via GitHub


rusackas commented on issue #19222:
URL: https://github.com/apache/superset/issues/19222#issuecomment-2137734304

   @dosu-bot


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] [Jinja] {{from_dttm}} and {{to_dttm}} variables not working as expected [superset]

2024-05-29 Thread via GitHub


JZ6 commented on issue #21793:
URL: https://github.com/apache/superset/issues/21793#issuecomment-2137709628

   Still seems to be an Issue on 3.1.1
   
![image](https://github.com/apache/superset/assets/10971263/d6c9bfc5-5a1c-4f24-8e1d-e2739f17c9da)
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Histogram Chart does not apply groupby /dimension grouping to the generated query [superset]

2024-05-29 Thread via GitHub


michael-s-molina commented on issue #23066:
URL: https://github.com/apache/superset/issues/23066#issuecomment-2137615534

   https://github.com/apache/superset/pull/28652 will close this issue by 
clearly defining that only non-aggregated columns are supported.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Typo in IBM DB2 image reference in README.md [superset]

2024-05-29 Thread via GitHub


dosubot[bot] commented on issue #28764:
URL: https://github.com/apache/superset/issues/28764#issuecomment-2137573679

   
   Hey @krushnarout! I'm here to help you with any bugs, questions, or 
contributions. I'll assist you while we wait for a human maintainer.
   
   
   To correct the typo in the IBM DB2 image reference in the `README.md` file, 
you should change `imb-db2.svg` to `ibm-db2.svg` or `ibm-db2.png`. Here is the 
corrected section of the code:
   
   ```md
   https://superset.apache.org/img/databases/ibm-db2.svg; alt="db2" 
border="0" width="220" />
   ```
   
   Alternatively, if you prefer to use the `.png` format:
   
   ```md
   https://superset.apache.org/img/databases/ibm-db2.png; alt="db2" 
border="0" width="220" />
   ```
   
   This change should be made in the `Supported Databases` section of the 
`README.md` file 
[[1]](https://github.com/apache/superset/blob/master/README.md).
   
   
   
   
   
   
    Details
   
   
   **About Dosu**
   This response is meant to be useful and save you time. It is **not meant to 
be a precise solution**, but rather a starting point for your own research.
   
   Help me be more useful! Please leave a  if this is helpful and  if it is 
irrelevant.
   
   
   *To continue the conversation, mention @dosu.*
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Duplicate Superset Dasshboard via Import/Export and ability to point to new DataSet [superset]

2024-05-29 Thread via GitHub


3mmdrew commented on issue #20090:
URL: https://github.com/apache/superset/issues/20090#issuecomment-2137573837

   Currently attempting to deploy prod/stage/dev supersets for internal company 
data. Some supported feature for env replication or at least exports with 
variable dataset connections based on env variables would be incredibly useful!
   The overwriting of the database files in the export is feasible but feels 
like a clunky and risky way of deploying.


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[I] Typo in IBM DB2 image reference in README.md [superset]

2024-05-29 Thread via GitHub


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

   ## Screenshot
   
   
![README.md](https://github.com/apache/superset/assets/129386740/68ec384e-10b6-4fdf-9100-28b17181081b)
   
   ## Description
   
   The issue lies with the `imb-db2.svg` file name, which should be corrected 
to `ibm-db2.svg` or `ibm-db2.png`.
   
   Current code snippet with the issue:
   
   ```
   https://superset.apache.org/img/databases/imb-db2.svg; alt="db2" 
border="0" width="220" />
   ```
   
   Should be:
   
   ```
   https://superset.apache.org/img/databases/ibm-db2.svg; alt="db2" 
border="0" width="220" />
   ```
   
   or
   
   ```
   https://superset.apache.org/img/databases/ibm-db2.png; alt="db2" 
border="0" width="220" />
   ```
   
   ## Design input
   
   No specific design input is required for this issue, as it is a 
straightforward file name correction. 


-- 
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-unsubscr...@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix: Chart cache-warmup task fails on Superset 4.0 [superset]

2024-05-29 Thread via GitHub


codecov[bot] commented on PR #28706:
URL: https://github.com/apache/superset/pull/28706#issuecomment-2137544506

   ## 
[Codecov](https://app.codecov.io/gh/apache/superset/pull/28706?dropdown=coverage=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 Report
   Attention: Patch coverage is `7.14286%` with `13 lines` in your changes are 
missing coverage. Please review.
   > Project coverage is 64.55%. Comparing base 
[(`76d897e`)](https://app.codecov.io/gh/apache/superset/commit/76d897eaa2f9e137102bc194c2e3109c29d0348f?dropdown=coverage=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 to head 
[(`f9f3196`)](https://app.codecov.io/gh/apache/superset/commit/f9f3196f16f26dba96e9a402a7e8ff016b01f649?dropdown=coverage=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   > Report is 237 commits behind head on master.
   
   | 
[Files](https://app.codecov.io/gh/apache/superset/pull/28706?dropdown=coverage=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[superset/tasks/cache.py](https://app.codecov.io/gh/apache/superset/pull/28706?src=pr=tree=superset%2Ftasks%2Fcache.py_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-c3VwZXJzZXQvdGFza3MvY2FjaGUucHk=)
 | 7.14% | [13 Missing :warning: 
](https://app.codecov.io/gh/apache/superset/pull/28706?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   
   Additional details and impacted files
   
   
   ```diff
   @@Coverage Diff @@
   ##   master   #28706  +/-   ##
   ==
   + Coverage   60.48%   64.55%   +4.06% 
   ==
 Files1931  522-1409 
 Lines   7623637504   -38732 
 Branches 85680-8568 
   ==
   - Hits4611424209   -21905 
   + Misses  2801713295   -14722 
   + Partials 21050-2105 
   ```
   
   | 
[Flag](https://app.codecov.io/gh/apache/superset/pull/28706/flags?src=pr=flags_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[hive](https://app.codecov.io/gh/apache/superset/pull/28706/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `49.11% <7.14%> (-0.06%)` | :arrow_down: |
   | 
[javascript](https://app.codecov.io/gh/apache/superset/pull/28706/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `?` | |
   | 
[presto](https://app.codecov.io/gh/apache/superset/pull/28706/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `53.66% <7.14%> (-0.15%)` | :arrow_down: |
   | 
[python](https://app.codecov.io/gh/apache/superset/pull/28706/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `64.55% <7.14%> (+1.06%)` | :arrow_up: |
   | 
[unit](https://app.codecov.io/gh/apache/superset/pull/28706/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `58.95% <0.00%> (+1.32%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/superset/pull/28706?dropdown=coverage=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Import is not working: An error occurred while importing dashboard: Import dashboard failed for an unknown reason [superset]

2024-05-29 Thread via GitHub


constantin-huetterer commented on issue #19222:
URL: https://github.com/apache/superset/issues/19222#issuecomment-2137544346

   We had the same issue. Downgrading to 4.0.0 fixed the problem for us:
   ```bash
   export TAG=4.0.0
   docker compose -f docker-compose-image-tag.yml up
   ```
   
   Here are two example Dashboards, one created with the latest version of 
Superset and one after the fix with tag 4.0.
   
   [Broken export in latest Superset 
version](https://github.com/apache/superset/files/15485762/dashboard_export_20240529T110715.zip)
   
   [Working export (v. 
4.0)](https://github.com/apache/superset/files/15485767/dashboard_export_clustering_template_20240529T114255.zip)
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix: don't strip SQL comments in Explore - 2nd try [superset]

2024-05-29 Thread via GitHub


michael-s-molina commented on PR #28753:
URL: https://github.com/apache/superset/pull/28753#issuecomment-2137338360

   ```
   select *
   from (
  select rank() over (partition by table_a order by updated_at desc) as rnk
  , table_a as metadata_table_a
  , cast(date_trunc('day', from_unixtime(cast(json_extract(metadata, 
'$.a.b') as double))) as date)
  --, CAST(json_extract(metadata,'$.a.c') as VARCHAR) x
  , cast(json_extract(metadata, '$.a.d.0.f') as varchar) region_0
  from (
select rank() over (partition by table_a order by if(metadata is not 
null, 1, 2)) as rnk_null
   ,  *
from schema_a.table_b
where ds = '{{trino.latest_partition(' schema_a.table_b') }}' 
and type = 'abc' and substr(deleted_at, 1, 4) = ''
  )
  where rnk_null = 1
   ```


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] refactor: Unify all json.(loads|dumps) usage to utils.json [superset]

2024-05-29 Thread via GitHub


geido commented on PR #28702:
URL: https://github.com/apache/superset/pull/28702#issuecomment-2137312952

   Hey @eyalezer this is great. If you haven't, feel free to join the [Apache 
Superset](https://join.slack.com/t/apache-superset/shared_invite/zt-2be0drwz8-bxPfkdz28ozzk1Iox29ufg)
 Slack. I'd be happy to help if you wish to contribute more to the project!


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] chore: add unique constraint to tagged_objects [superset]

2024-05-29 Thread via GitHub


Vitor-Avila commented on PR #26654:
URL: https://github.com/apache/superset/pull/26654#issuecomment-2137310010

   @mistercrunch we got a few reports of users facing errors to delete objects 
on our end as well (after the fix was released to production). Here's an 
example stack trace:
   ```
   Traceback (most recent call last):
 File "/home/superset/preset/superset/superset/daos/base.py", line 217, in 
delete
   db.session.commit()
 File "", line 2, in commit
 File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", 
line 1435, in commit
   self._transaction.commit(_to_root=self.future)
 File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", 
line 829, in commit
   self._prepare_impl()
 File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", 
line 808, in _prepare_impl
   self.session.flush()
 File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", 
line 3367, in flush
   self._flush(objects)
 File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", 
line 3507, in _flush
   transaction.rollback(_capture_exception=True)
 File 
"/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 
70, in __exit__
   compat.raise_(
 File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", 
line 207, in raise_
   raise exception
 File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", 
line 3467, in _flush
   flush_context.execute()
 File 
"/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/unitofwork.py", line 
456, in execute
   rec.execute(self)
 File 
"/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/unitofwork.py", line 
577, in execute
   self.dependency_processor.process_deletes(uow, states)
 File 
"/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/dependency.py", line 
1110, in process_deletes
   self._run_crud(
 File 
"/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/dependency.py", line 
1207, in _run_crud
   raise exc.StaleDataError(
   sqlalchemy.orm.exc.StaleDataError: DELETE statement on table 'tagged_object' 
expected to delete 1 row(s); Only 2 were matched.
   
   The above exception was the direct cause of the following exception:
   
   Traceback (most recent call last):
 File 
"/home/superset/preset/superset/superset/commands/dashboard/delete.py", line 
49, in run
   DashboardDAO.delete(self._models)
 File "/home/superset/preset/superset/superset/daos/base.py", line 220, in 
delete
   raise DAODeleteFailedError(exception=ex) from ex
   superset.daos.exceptions.DAODeleteFailedError: Delete failed
   ```
   
   I managed to reproduce with a certain dashboard on my end as well, but it's 
inconsistent (I can't reliably reproduce with every new dashboard).


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix: don't strip SQL comments in Explore - 2nd try [superset]

2024-05-29 Thread via GitHub


michael-s-molina commented on PR #28753:
URL: https://github.com/apache/superset/pull/28753#issuecomment-2137305507

   > @michael-s-molina could use a failing query or more input on the pattern 
identified
   
   ```
   /* Comment */
   select
r.column_a as column_1 ,
r.column_b as column_2 ,
r.ds as ds_removal ,
a.column_a is not null as column_3 ,
a.ds as ds_appeal_attempt ,
lr.column_c as column_4 ,
r.column_d as column_5 ,
r.column_e as column_6 ,
r.column_f as column_7 ,
r.column_g as column_8 ,
r.column_h as column_9 ,
r.column_i as column_10 ,
active.column_j as column_11
   from
schema_a.table_a r
   join schema_a.table_b lr on
r.column_a = lr.column_a
and r.ds >= lr.column_b_start
and r.ds < lr.column_b_end
and lr.ds = (
select
MAX(ds)
from
schema_a.table_b)
   join schema_b.table_a active on
r.column_a = cast(active.column_a as VARCHAR)
and active.ds = '{{presto.latest_partition(' schema_b.table_a')}}'
   left join schema_a.table_a a on
r.column_a = a.column_a
and a.column_k = 'quality'
and a.column_l = 1
and a.ds >= r.ds
and r.ds >= '2023-04-03'
   where
r.column_k = 'quality'
and r.column_l = 1
and r.ds >= '2023-04-03'
and r.column_m = 'points' -- comment
   ```


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix: don't strip SQL comments in Explore - 2nd try [superset]

2024-05-29 Thread via GitHub


michael-s-molina commented on PR #28753:
URL: https://github.com/apache/superset/pull/28753#issuecomment-2137306781

   ```
   with table_a as (
   select
column_a as interaction_id,
trim_array(column_a,
1 + column_b['column_c']) as column_d,
(cardinality(column_a) -1 - column_b['column_c']) as column_e,
column_f as column_g,
column_h as column_i,
column_j as column_k,
column_l as column_m,
column_n as column_o,
column_p as column_q,
column_r as column_s,
column_t as column_u,
ds
   from
schema_a.table_a
   where
cardinality(column_a) > 1
and column_s = 'PHONE'
and column_v = 'INBOUND'
and (column_b['column_c'] = 0
or (column_b['column_c'] = 1
and column_b['column_w'] = 3)) )
   select
c.column_x as column_y,
c.column_z as column_aa,
c.column_ab as column_ac,
c.column_g as column_ad,
c.column_ae as column_af,
c.column_ag as column_ah,
c.column_ai as column_aj,
a.interaction_id,
a.column_b,
a.column_c,
column_e,
a.column_d as column_aj,
a.column_f as column_ak,
d.column_al,
cast(from_iso8601_timestamp(d.column_r) as TIMESTAMP) as column_am,
cast(from_iso8601_timestamp(d.column_s) as TIMESTAMP) as column_an,
date_diff('second',
cast(from_iso8601_timestamp(d.column_r) as TIMESTAMP),
cast(from_iso8601_timestamp(d.column_s) as TIMESTAMP)) as column_ao,
d.ds,
a.column_g,
a.column_i as column_ap,
a.ds as column_aq,
t.column_as
   from
table_a a
   cross join unnest(a.column_d) t(column_as)
   join schema_a.table_b c on
c.column_a = t.column_as
   left join schema_b.table_c d on
c.column_at = d.column_at
   where
c.column_au
and d.column_av = 'NOT_RESPONDING'
and c.ds = cast(cast('{{ presto.latest_partition(' schema_a.table_b') 
}}' as DATE) as VARCHAR)
and a.ds = cast(cast('{{ presto.latest_partition(' schema_a.table_a') 
}}' as DATE) as VARCHAR)
--AND d.ds = CAST(CAST('{{ presto.latest_partition('schema_b.table_c') 
}}' AS DATE) AS VARCHAR) 
AND CAST(from_iso8601_timestamp(d.column_r) AS TIMESTAMP) between 
a.column_d and a.column_e
   ```


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[PR] feat(helm): enable custom autoscaling solutions [superset]

2024-05-29 Thread via GitHub


hanslemm opened a new pull request, #28762:
URL: https://github.com/apache/superset/pull/28762

   ### SUMMARY
   This PR allows Helm deployments to use custom autoscaling solutions. In my 
company, we don't use the Kubernetes metrics server for autoscaling, but rather 
[Keda](https://keda.sh/) with Prometheus metrics. With that in mind, the 
current Helm deployment doesn't work for me, as the HPA cannot find the metrics 
to autoscale.
   
   This PR introduces a `.Values.supersetNode.autoscaling.custom` and 
`.Values.supersetWorker.autoscaling.custom` bool keys that:
   - If `.Values.supersetNode.autoscaling.enabled is TRUE and 
.Values.supersetNode.custom is FALSE` then creates HPA for Node and removes 
ReplicaCount for Node deployment.
   - If `.Values.supersetNode.autoscaling.enabled is TRUE and 
.Values.supersetNode.custom is TRUE` then it *does not* create HPA for Node and 
removes ReplicaCount for Node deployment.
   - If `.Values.supersetNode.autoscaling.enabled is FALSE` then no autoscaling 
logic is enabled.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   
   ### TESTING INSTRUCTIONS
   
   
   ### ADDITIONAL INFORMATION
   
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
 - [ ] Migration is atomic, supports rollback & is backwards-compatible
 - [ ] Confirm DB migration upgrade and downgrade tested
 - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [PR] fix: don't strip SQL comments in Explore - 2nd try [superset]

2024-05-29 Thread via GitHub


michael-s-molina commented on PR #28753:
URL: https://github.com/apache/superset/pull/28753#issuecomment-2137245988

   /testenv up


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Add button grayed out even tough all fields are filled [superset]

2024-05-29 Thread via GitHub


maclynn147 commented on issue #28758:
URL: https://github.com/apache/superset/issues/28758#issuecomment-2137245480

   Hi
   
   I found this
   
   const validateNotificationSection = () => {\nconst hasErrors = 
!checkNotificationSettings();\nconst errors = hasErrors ? 
[TRANSLATIONS.RECIPIENTS_ERROR_TEXT] : [];\n
updateValidationStatus(Sections.Notification, errors);\n  };\n\n 


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Datasource access [superset]

2024-05-29 Thread via GitHub


dosubot[bot] commented on issue #28760:
URL: https://github.com/apache/superset/issues/28760#issuecomment-2137225628

   
   The inconsistency in dashboards being shown for some datasets but not for 
others when accessed by a Gamma role user in Apache Superset version 2.1.0 is 
likely due to a permissions issue. Specifically, the fix for this issue is 
mentioned in the changelog:
   
   - [#23118](https://github.com/apache/superset/pull/23118) fix(rbac): show 
objects accessible by database access perm (@villebro)
   
   This fix ensures that objects (such as dashboards) are shown to users based 
on their database access permissions. To resolve this inconsistency, you should 
ensure that the Gamma role has the appropriate database access permissions for 
the datasets in question.
   
   Additionally, the integration tests for dashboard security in Superset 
provide further insights into how permissions are managed. For example, the 
`test_users_can_list_published_dashboard` test ensures that users can view 
dashboards if they have the necessary permissions for the underlying datasets.
   
   Here is a code snippet to check and update the permissions for the Gamma 
role:
   
   ```python
   from superset import security_manager
   
   # Get the Gamma role
   gamma_role = security_manager.find_role("Gamma")
   
   # Ensure the Gamma role has the necessary database access permissions
   databases = security_manager.get_all_databases()
   for database in databases:
   security_manager.add_permission_role(gamma_role, 
security_manager.find_permission_view_menu("database_access", database.perm))
   
   # Commit the changes
   security_manager.get_session.commit()
   ```
   
   This code ensures that the Gamma role has access to all databases, which 
should resolve the issue of dashboards not being shown for some datasets. 
Additionally, you can refer to the integration tests in 
`tests/integration_tests/security_tests.py` for more examples of how 
permissions are handled in Superset. For instance, the 
`test_gamma_user_schema_access_to_dashboards` test verifies that users can list 
published dashboards, ensuring that permissions are correctly applied 
[[1]](https://github.com/apache/superset/blob/master/CHANGELOG/2.1.0.md)[[2]](https://github.com/apache/superset/blob/master/tests/integration_tests/dashboards/security/security_dataset_tests.py)[[3]](https://github.com/apache/superset/blob/master/tests/integration_tests/dashboard_tests.py)[[4]](https://github.com/apache/superset/blob/master/tests/integration_tests/security_tests.py).
   
   
   
   
   
   
    Details
   
   
   **About Dosu**
   This response is meant to be useful and save you time. It is **not meant to 
be a precise solution**, but rather a starting point for your own research.
   
   Help me be more useful! Please leave a  if this is helpful and  if it is 
irrelevant.
   
   
   *To continue the conversation, mention @dosu.*
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Datasource access [superset]

2024-05-29 Thread via GitHub


Zarrina1 commented on issue #28760:
URL: https://github.com/apache/superset/issues/28760#issuecomment-2137215381

   @dosu But why using some datasets dashboards are shown ,with other are not?


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Datasource access [superset]

2024-05-29 Thread via GitHub


dosubot[bot] commented on issue #28760:
URL: https://github.com/apache/superset/issues/28760#issuecomment-2137206574

   
   You should write the `can_access_dashboard` method in the 
`SupersetSecurityManager` class within the `superset/security/manager.py` file. 
Here is the method definition for reference:
   
   ```python
   def can_access_dashboard(self, dashboard: "Dashboard") -> bool:
   """
   Return True if the user can access the specified dashboard, False 
otherwise.
   
   :param dashboard: The dashboard
   :returns: Whether the user can access the dashboard
   """
   try:
   self.raise_for_access(dashboard=dashboard)
   except SupersetSecurityException:
   return False
   
   return True
   ```
   
   This method ensures that the permissions for accessing a dashboard are 
checked correctly by calling the `raise_for_access` method and handling any 
`SupersetSecurityException` that might be raised 
[[1]](https://github.com/apache/superset/blob/master/superset/security/manager.py).
   
   
   
   
   
   
    Details
   
   
   **About Dosu**
   This response is meant to be useful and save you time. It is **not meant to 
be a precise solution**, but rather a starting point for your own research.
   
   Help me be more useful! Please leave a  if this is helpful and  if it is 
irrelevant.
   
   
   *To continue the conversation, mention @dosu.*
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Datasource access [superset]

2024-05-29 Thread via GitHub


Zarrina1 commented on issue #28760:
URL: https://github.com/apache/superset/issues/28760#issuecomment-2137194598

   def can_access_dashboard(self, dashboard: "Dashboard") -> bool:
   try:
   self.raise_for_access(dashboard=dashboard)
   except SupersetSecurityException:
   return False
   return True 
   Where can i write this?


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Datasource access [superset]

2024-05-29 Thread via GitHub


dosubot[bot] commented on issue #28760:
URL: https://github.com/apache/superset/issues/28760#issuecomment-2137156033

   
   @Zarrina1 Hello there! I'm here to help you with any bugs, questions, or 
contributions you have for the repository. Let's squash those bugs together! 烙
   
   
   To resolve the issue where a Gamma role user can see some datasets in the 
Dataset folder but cannot see the related dashboards for those datasets in 
Superset version 2.1.0, follow these steps:
   
   1. **Ensure Gamma Role Permissions**: Verify that the Gamma role user has 
access to the data sources used in the dashboards. Gamma users can only view 
slices and dashboards made from data sources they have access to.
   
   2. **Create a Complementary Role**:
  - Go to `Menu -> Security -> List Roles` and click the `+` sign.
  - Name the new role, assign it to users, and select the tables in the 
**Permissions** dropdown.
  - Use the typeahead to search for your table names and select the data 
sources you want to associate with this role.
   
   3. **Assign the New Role**:
  - Assign this new role to the Gamma role user.
  - Confirm with the user that they can see the objects (dashboards and 
slices) associated with the tables you just extended them.
   
   4. **Check Dashboard Publication**: Ensure that the dashboards are 
published. Dashboards need to be published for them to be visible to users. 
Verify this by checking the `published` attribute of the dashboards.
   
   5. **Verify Permissions**: Use the `can_access_dashboard` method to check if 
the user has the necessary permissions to access the dashboard:
   
   ```python
   def can_access_dashboard(self, dashboard: "Dashboard") -> bool:
   try:
   self.raise_for_access(dashboard=dashboard)
   except SupersetSecurityException:
   return False
   return True
   ```
   
   By following these steps, you should be able to resolve the issue and ensure 
that the Gamma role user can see the related dashboards for the datasets they 
have access to 
[[1]](https://github.com/apache/superset/blob/master/docs/docs/security/security.mdx)[[2]](https://github.com/apache/superset/blob/master/CHANGELOG/2.1.0.md)[[3]](https://github.com/apache/superset/blob/master/tests/integration_tests/dashboard_tests.py)[[4]](https://github.com/apache/superset/blob/master/superset/security/manager.py)[[5]](https://github.com/apache/superset/blob/master/tests/integration_tests/dashboards/security/security_dataset_tests.py).
   
   
   
   
   
   
    Details
   
   
   **About Dosu**
   This response is meant to be useful and save you time. It is **not meant to 
be a precise solution**, but rather a starting point for your own research.
   
   Help me be more useful! Please leave a  if this is helpful and  if it is 
irrelevant.
   
   
   *To continue the conversation, mention @dosu.*
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[I] Datasource access [superset]

2024-05-29 Thread via GitHub


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

   ### Bug description
   
   Hello everyone!
   I have Superset version 2.1.0
   I have an issue while giving access to gamma role on particular dataset .
   Normal situation is when I give datasource access to  Gamma role. So after 
that Gamma-user can see  dashboards where «my_dataset» was used as source  and 
also Gamma user can see «my_dataset» in Dataset folder .This works with only 
some datasets .
   Result:
   Gamma Role with dataset access
   
![3](https://github.com/apache/superset/assets/171135936/b3deeacd-a047-4988-afd7-7797e973dab9)
   What this Gamma Role will see :
   Connected dashboard
   
![4](https://github.com/apache/superset/assets/171135936/874e8e98-5516-49c3-9a16-e973283bd8f9)
   Needed dataset
   
![5](https://github.com/apache/superset/assets/171135936/c483c968-1270-410f-8815-be3ad1861092)
   
   So another situation is when I give also datasource access to  Gamma role 
but on another dataset (for ex- «dataset2» ) and dataset2 is used in some 
dashboards .This dashboards are not been displayed at all for the gamma-user 
but the user can see «dataset2» in Dataset folder .
   Giving access process:
   
![1](https://github.com/apache/superset/assets/171135936/d3850b3e-1b06-445e-aee4-72b4bcf753c6)
   So all user is able to see :
   
![2](https://github.com/apache/superset/assets/171135936/8e4933ed-51ea-472c-8919-b455e87e279a)
   But no dashboards !
   How to solve it ?Why are dashboards been shown only with some datasets? 
   
   
   
   ### How to reproduce the bug
   
   1.Create Gamma role with datasourse access on [Cluster].[dataset]
   2.Gamma role user can see dataset but no related charts/dashboard 
   ps. dashboards are shown with some datasets ,with **other **datasets are 
not
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   I don't know
   
   ### Node version
   
   I don't know
   
   ### 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: notifications-unsubscr...@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] [Explore]Chart Gridlines [superset]

2024-05-29 Thread via GitHub


hajira-novopay commented on issue #13400:
URL: https://github.com/apache/superset/issues/13400#issuecomment-2137134441

   Why is it closed 
   Css is not working for grid lines 
   
   Please suggest
   
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] Unable to execute any Superset command in terminal [superset]

2024-05-29 Thread via GitHub


dosubot[bot] commented on issue #28759:
URL: https://github.com/apache/superset/issues/28759#issuecomment-2137132242

   
   Hey there, @EuphoriaCelestial! I'm here to help you with your Superset 
issue. Let's get this sorted out together!
   
   
   To resolve the issue where Superset commands fail to execute, specifically 
when trying to create an admin account using `superset fab create-admin`, 
resulting in an `AttributeError`, ensure that the `SupersetAppInitializer` 
class is properly initialized and configured. The `SupersetAppInitializer` 
class handles various initialization tasks, including setting up the Flask app, 
configuring Celery, and initializing views.
   
   Here is a snippet of the `SupersetAppInitializer` class that shows the 
initialization process:
   
   ```python
   class SupersetAppInitializer:  # pylint: disable=too-many-public-methods
   def __init__(self, app: SupersetApp) -> None:
   super().__init__()
   
   self.superset_app = app
   self.config = app.config
   self.manifest: dict[Any, Any] = {}
   
   def init_app(self) -> None:
   """
   Main entry point which will delegate to other methods in
   order to fully init the app
   """
   self.pre_init()
   self.check_secret_key()
   self.configure_session()
   # Configuration of logging must be done first to apply the formatter 
properly
   self.configure_logging()
   # Configuration of feature_flags must be done first to allow init 
features
   # conditionally
   self.configure_feature_flags()
   self.configure_db_encrypt()
   self.setup_db()
   self.configure_celery()
   self.enable_profiling()
   self.setup_event_logger()
   self.setup_bundle_manifest()
   self.register_blueprints()
   self.configure_wtf()
   self.configure_middlewares()
   self.configure_cache()
   
   with self.superset_app.app_context():
   self.init_app_in_ctx()
   
   self.post_init()
   ```
   
   Ensure that the `init_app` method is called to complete the initialization 
process. This method delegates to other methods to fully initialize the app, 
including setting up the database, configuring Celery, and registering 
blueprints.
   
   Additionally, you can refer to the `docker/docker-init.sh` script provided 
by Superset for initializing the application in a Docker environment. This 
script includes steps to apply database migrations, create an admin user, and 
set up roles and permissions. Here is the relevant part of the script for 
creating an admin user:
   
   ```sh
   # Create an admin user
   echo_step "2" "Starting" "Setting up admin user ( admin / $ADMIN_PASSWORD )"
   superset fab create-admin \
 --username admin \
 --firstname Superset \
 --lastname Admin \
 --email ad...@superset.com \
 --password $ADMIN_PASSWORD
   echo_step "2" "Complete" "Setting up admin user"
   ```
   
   Make sure to follow these steps and ensure that all necessary attributes and 
configurations are properly set up before running the `superset fab 
create-admin` command. If you encounter an `AttributeError`, it might be due to 
a missing or improperly configured attribute in the `SupersetAppInitializer` 
class or an issue with the environment setup 
[[1]](https://github.com/apache/superset/blob/master/superset/initialization/__init__.py)[[2]](https://github.com/apache/superset/blob/master/docker/docker-init.sh).
   
   
   
   
   
   
    Details
   
   
   **About Dosu**
   This response is meant to be useful and save you time. It is **not meant to 
be a precise solution**, but rather a starting point for your own research.
   
   Help me be more useful! Please leave a  if this is helpful and  if it is 
irrelevant.
   
   
   *To continue the conversation, mention @dosu.*
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[I] Unable to execute any Superset command in terminal [superset]

2024-05-29 Thread via GitHub


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

   ### Bug description
   
   I deploy my Superset instance using Docker image and Helm
   When the service is up, I can not login using admin/admin account
   So I search on document and found out that I need to create admin account 
using superset fab command
   But that command failed to execute, error log provided below
   I also tried other superset command, but nothing is executable, all return 
the same error
   
   ### How to reproduce the bug
   
   1. Build a Superset image using Dockerfile
   2. Deploy using Helm
   3. Create admin account using "superset fab create-admin"
   4. Encounter error
   
   ### Screenshots/recordings
   
   `root@superset-564cfd87c4-mkcqq:/app# superset superset fab create-admin
   Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]
   logging was configured successfully
   2024-05-29 09:48:52,198:INFO:superset.utils.logging_configurator:logging was 
configured successfully
   2024-05-29 09:48:52,204:INFO:root:Configured event logger of type 
   /usr/local/lib/python3.9/site-packages/flask_limiter/extension.py:293: 
UserWarning: Using the in-memory storage for tracking rate limits as no storage 
was explicitly specified. This is not recommended for production use. See: 
https://flask-limiter.readthedocs.io#configuring-a-storage-backend for 
documentation about configuring the storage backend.
 warnings.warn(
   logging was configured successfully
   logging was configured successfully
   2024-05-29 09:48:53,511:INFO:superset.utils.logging_configurator:logging was 
configured successfully
   2024-05-29 09:48:53,512:INFO:root:Configured event logger of type 
   /usr/local/lib/python3.9/site-packages/flask_limiter/extension.py:293: 
UserWarning: Using the in-memory storage for tracking rate limits as no storage 
was explicitly specified. This is not recommended for production use. See: 
https://flask-limiter.readthedocs.io#configuring-a-storage-backend for 
documentation about configuring the storage backend.
 warnings.warn(
   Failed to create app
   Traceback (most recent call last):
 File "/app/superset/app.py", line 40, in create_app
   app_initializer.init_app()
 File "/app/superset/initialization/__init__.py", line 512, in init_app
   self.init_app_in_ctx()
 File "/app/superset/initialization/__init__.py", line 438, in 
init_app_in_ctx
   self.configure_fab()
 File "/app/superset/initialization/__init__.py", line 562, in configure_fab
   appbuilder.init_app(self.superset_app, db.session)
 File "/app/custom-lib/flask_appbuilder/base.py", line 218, in init_app
   self._add_admin_views()
 File "/app/custom-lib/flask_appbuilder/base.py", line 325, in 
_add_admin_views
   self.sm.register_views()
 File "/app/custom-lib/flask_appbuilder/security/sqla/manager.py", line 95, 
in register_views
   super(SecurityManager, self).register_views()
 File "/app/custom-lib/flask_appbuilder/security/manager.py", line 737, in 
register_views
   self.limiter.limit(self.auth_rate_limit, methods=["POST"])(
 File "/usr/local/lib/python3.9/site-packages/flask_limiter/extension.py", 
line 1164, in call
   name = get_qualified_name(obj)
 File "/usr/local/lib/python3.9/site-packages/flask_limiter/util.py", line 
32, in get_qualified_name
   return f"{callable.module}.{callable.name}.{callable.qualname}"
   AttributeError: 'NoneType' object has no attribute 'module'
   Failed to create app
   Traceback (most recent call last):
 File "/app/superset/app.py", line 40, in create_app
   app_initializer.init_app()
 File "/app/superset/initialization/__init__.py", line 512, in init_app
   self.init_app_in_ctx()
 File "/app/superset/initialization/__init__.py", line 438, in 
init_app_in_ctx
   self.configure_fab()
 File "/app/superset/initialization/__init__.py", line 562, in configure_fab
   appbuilder.init_app(self.superset_app, db.session)
 File "/app/custom-lib/flask_appbuilder/base.py", line 218, in init_app
   self._add_admin_views()
 File "/app/custom-lib/flask_appbuilder/base.py", line 325, in 
_add_admin_views
   self.sm.register_views()
 File "/app/custom-lib/flask_appbuilder/security/sqla/manager.py", line 95, 
in register_views
   super(SecurityManager, self).register_views()
 File "/app/custom-lib/flask_appbuilder/security/manager.py", line 737, in 
register_views
   self.limiter.limit(self.auth_rate_limit, methods=["POST"])(
 File "/usr/local/lib/python3.9/site-packages/flask_limiter/extension.py", 
line 1164, in call
   name = get_qualified_name(obj)
 File "/usr/local/lib/python3.9/site-packages/flask_limiter/util.py", line 
32, in get_qualified_name
   return f"{callable.module}.{callable.name}.{callable.qualname}"
   AttributeError: 'NoneType' object has no attribute 'module'
   2024-05-29 

Re: [I] Add button grayed out even tough all fields are filled [superset]

2024-05-29 Thread via GitHub


dosubot[bot] commented on issue #28758:
URL: https://github.com/apache/superset/issues/28758#issuecomment-2137098981

   
   Hey there, @maclynn147! I'm here to help you with any bugs, questions, or 
contributions you have. Let's tackle this issue together!
   
   
   To resolve the issue where the "Add" button remains grayed out even though 
all fields are filled, ensure that all required fields are correctly filled out 
and validated. Here are the key validation checks you need to confirm:
   
   1. **General Section**:
   - Ensure the `name` and `owners` fields are filled.
   ```tsx
   const validateGeneralSection = () => {
   const errors = [];
   if (!currentAlert?.name?.length) {
   errors.push(TRANSLATIONS.NAME_ERROR_TEXT);
   }
   if (!currentAlert?.owners?.length) {
   errors.push(TRANSLATIONS.OWNERS_ERROR_TEXT);
   }
   updateValidationStatus(Sections.General, errors);
   };
   ```
   
   2. **Content Section**:
   - Ensure the `dashboard` or `chart` field is filled based on the content 
type.
   ```tsx
   const validateContentSection = () => {
   const errors = [];
   if (
   !(
   (contentType === 'dashboard' && !!currentAlert?.dashboard) ||
   (contentType === 'chart' && !!currentAlert?.chart)
   )
   ) {
   errors.push(TRANSLATIONS.CONTENT_ERROR_TEXT);
   }
   updateValidationStatus(Sections.Content, errors);
   };
   ```
   
   3. **Alert Section**:
   - Ensure the `database`, `sql`, and `validator_config_json` fields are 
filled.
   ```tsx
   const validateAlertSection = () => {
   const errors = [];
   if (!currentAlert?.database) {
   errors.push(TRANSLATIONS.DATABASE_ERROR_TEXT);
   }
   if (!currentAlert?.sql?.length) {
   errors.push(TRANSLATIONS.SQL_ERROR_TEXT);
   }
   if (
   !(
   (conditionNotNull || 
!!currentAlert?.validator_config_json?.op) &&
   (conditionNotNull ||
   currentAlert?.validator_config_json?.threshold !== 
undefined)
   )
   ) {
   errors.push(TRANSLATIONS.ALERT_CONDITION_ERROR_TEXT);
   }
   updateValidationStatus(Sections.Alert, errors);
   };
   ```
   
   4. **Schedule Section**:
   - Ensure the `crontab` and `working_timeout` fields are filled.
   ```tsx
   const validateScheduleSection = () => {
   const errors = [];
   if (!currentAlert?.crontab?.length) {
   errors.push(TRANSLATIONS.CRONTAB_ERROR_TEXT);
   }
   if (!currentAlert?.working_timeout) {
   errors.push(TRANSLATIONS.WORKING_TIMEOUT_ERROR_TEXT);
   }
   updateValidationStatus(Sections.Schedule, errors);
   };
   ```
   
   5. **Notification Section**:
   - Ensure the notification settings are correctly configured.
   ```tsx
   const validateNotificationSection = () => {
   const hasErrors = !checkNotificationSettings();
   const errors = hasErrors ? [TRANSLATIONS.RECIPIENTS_ERROR_TEXT] : [];
   if (emailError) {
   errors.push(TRANSLATIONS.EMAIL_SUBJECT_ERROR_TEXT);
   }
   updateValidationStatus(Sections.Notification, errors);
   };
   ```
   
   6. **Overall Validation**:
   - Call the `validateAll` function to perform all validation checks.
   ```tsx
   const validateAll = () => {
   validateGeneralSection();
   validateContentSection();
   if (!isReport) validateAlertSection();
   validateScheduleSection();
   validateNotificationSection();
   };
   ```
   
   7. **Enforce Validation**:
   - Ensure the `enforceValidation` function is called to update the state 
of the "Add" button.
   ```tsx
   const enforceValidation = () => {
   const sections = [
   Sections.General,
   Sections.Content,
   isReport ? undefined : Sections.Alert,
   Sections.Schedule,
   Sections.Notification,
   ];
   
   const hasErrors = sections.some(
   section => section && validationStatus[section].hasErrors,
   );
   const tooltip = hasErrors ? 
buildErrorTooltipMessage(validationStatus) : '';
   setErrorTooltipMessage(tooltip);
   setDisableSave(hasErrors);
   };
   ```
   
   Additionally, ensure that the translation keys are correctly defined in your 
translation files to avoid missing variable errors in the developer console 

[I] Add button grayed out even tough all fields are filled [superset]

2024-05-29 Thread via GitHub


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

   ## Screenshot
   ![Screenshot 2024-05-29 
154242](https://github.com/apache/superset/assets/95704030/9ad40a49-912a-4f82-8f8f-6ee8cf9f55d6)
   ![Screenshot 2024-05-29 
155129](https://github.com/apache/superset/assets/95704030/886fd89d-6ba8-49a7-a063-b842fd4b8f4f)
   
   [drag & drop image(s) here!]
   
   ## Description
   Add button grayed out even tough all fields are filled 
   
   I have filled all the necessary field for creating a report but the Add 
button is still not getting Activated, same issue is occurring with Alerts.
   
   Added console errors too
   
   


-- 
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-unsubscr...@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



Re: [I] superset fab list-users return username, email, role but not firstname, lastname, active [superset]

2024-05-29 Thread via GitHub


dosubot[bot] commented on issue #28691:
URL: https://github.com/apache/superset/issues/28691#issuecomment-2137013252

   
   It appears there might be some confusion or outdated information regarding 
the file structure. The `list-users` command and its related functionalities 
might be located in a different file or have been refactored.
   
   To locate the exact implementation of the `list-users` command, you can 
search for the command definition within the `superset/cli` directory. Look for 
files that define CLI commands using the `click` library, as this is commonly 
used for command-line interfaces in Python.
   
   If you need to modify the output of the `list-users` command to include 
`firstname`, `lastname`, and `active` columns, you can refer to the 
`UserResponseSchema` class in the `superset/views/users/schemas.py` file, which 
already includes these fields:
   
   ```python
   class UserResponseSchema(Schema):
   id = Integer()
   username = String()
   email = String()
   first_name = String()
   last_name = String()
   is_active = Boolean()
   is_anonymous = Boolean()
   ```
   
   Additionally, the `bootstrap_user_data` function in the 
`superset/views/utils.py` file can be used to fetch these details:
   
   ```python
   def bootstrap_user_data(user: User, include_perms: bool = False) -> 
dict[str, Any]:
   payload = {
   "username": user.username,
   "firstName": user.first_name,
   "lastName": user.last_name,
   "isActive": user.is_active,
   "isAnonymous": user.is_anonymous,
   }
   return payload
   ```
   
   These utilities can help you extend the `list-users` command to include the 
desired columns 
[[1]](https://github.com/apache/superset/blob/master/superset/views/users/schemas.py)[[2]](https://github.com/apache/superset/blob/master/superset/views/utils.py).
   
   
   
   
   
   
    Details
   
   
   **About Dosu**
   This response is meant to be useful and save you time. It is **not meant to 
be a precise solution**, but rather a starting point for your own research.
   
   Help me be more useful! Please leave a  if this is helpful and  if it is 
irrelevant.
   
   
   *To continue the conversation, mention @dosu.*
   


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



  1   2   >