You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2023/12/04 17:09:27 UTC

(superset) branch 3.0 updated (961eba6d97 -> 0fda81d811)

This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a change to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git


    from 961eba6d97 chore: Updates CHANGELOG.md for 3.0.2 (rc2)
     new 44fb6b5551 fix(horizontal filter bar filter labels): Increase max-width to 96px (#25883)
     new 0c0bb50d41 fix(security): restore default value of SESSION_COOKIE_SECURE to False (#26005)
     new 79d8865ac6 fix: Remove annotation Fuzzy to get french translation (#26010)
     new 7916778585 fix: Optimize fetching samples logic (#26060)
     new ff5de25478 fix: Prevent cached bootstrap data from leaking between users w/ same first/last name (#26023)
     new ea65c2467c fix: Flaky test_explore_json_async test (#26059)
     new b900cb7c3a fix(plugin-chart-echarts): support numerical x-axis (#26087)
     new 00db4dfb06 fix: bump node-fetch to 2.6.7 (#26091)
     new a3212ccba8 fix: flaky test_explore_json_async test v2 (#26106)
     new 3edbb9fdbd fix: alias column when fetching values (#26120)
     new 02188d8401 chore(deps): bump pillow deps (#25931)
     new a5c842c876 fix: remove default secret key from helm (#23916)
     new a4c5340c7e fix(annotations): time grain column (#26140)
     new ec6d31c817 fix: set label on adhoc column should persist (#26154)
     new 0b040b4824 fix(database-import): Support importing a DB connection with a version set (#26116)
     new 0fda81d811 fix(Alerts/Reports): allow use of ";" separator in slack recipient entry (#25894)

The 16 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 helm/superset/Chart.yaml                           |  2 +-
 helm/superset/README.md                            |  8 +-
 helm/superset/README.md.gotmpl                     |  6 ++
 helm/superset/templates/_helpers.tpl               |  1 -
 helm/superset/values.yaml                          |  2 +
 setup.py                                           |  2 +-
 superset-frontend/package-lock.json                |  2 +-
 superset-frontend/package.json                     |  2 +-
 .../src/Timeseries/transformProps.ts               | 15 ++--
 .../plugin-chart-echarts/src/utils/series.ts       |  9 +-
 .../plugin-chart-echarts/test/utils/series.test.ts |  9 ++
 .../src/components/Chart/chartAction.js            |  9 +-
 .../src/components/Chart/chartActions.test.js      | 67 +++++++++++++++
 .../FilterBar/FilterControls/FilterControl.tsx     |  1 -
 .../ColumnSelectPopover.test.tsx                   | 77 ++++++++++++++++++
 .../DndColumnSelectControl/ColumnSelectPopover.tsx | 39 ++++++++-
 .../ColumnSelectPopoverTrigger.tsx                 | 13 ++-
 superset/config.py                                 |  2 +
 superset/databases/schemas.py                      |  1 +
 superset/embedded/view.py                          |  4 +-
 superset/models/helpers.py                         | 10 ++-
 superset/reports/notifications/slack.py            | 11 ++-
 superset/translations/fr/LC_MESSAGES/messages.json | 75 ++++++++++++-----
 superset/translations/fr/LC_MESSAGES/messages.po   | 95 +++++++++-------------
 superset/utils/screenshots.py                      |  2 +-
 superset/views/base.py                             | 18 ++--
 superset/views/core.py                             |  6 +-
 superset/views/dashboard/views.py                  |  2 +-
 superset/views/datasource/utils.py                 |  2 +-
 tests/integration_tests/core_tests.py              | 15 +++-
 .../databases/commands/importers/v1/import_test.py | 21 +++++
 .../notifications/slack_tests.py}                  | 47 +++++------
 32 files changed, 424 insertions(+), 151 deletions(-)
 create mode 100644 superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.test.tsx
 copy tests/unit_tests/{notifications/email_tests.py => reports/notifications/slack_tests.py} (71%)


(superset) 11/16: chore(deps): bump pillow deps (#25931)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 02188d8401a1967c7008191a091b06f21e1da4eb
Author: Gnought <16...@users.noreply.github.com>
AuthorDate: Wed Nov 29 21:59:27 2023 +0800

    chore(deps): bump pillow deps (#25931)
    
    (cherry picked from commit a27a0df1a4933fbe8bced50e80bcb3856cd5db2a)
---
 setup.py                      | 2 +-
 superset/utils/screenshots.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index 1bd979c107..612ba88922 100644
--- a/setup.py
+++ b/setup.py
@@ -184,7 +184,7 @@ setup(
         "snowflake": ["snowflake-sqlalchemy>=1.2.4, <2"],
         "spark": ["pyhive[hive]>=0.6.5", "tableschema", "thrift>=0.14.1, <1.0.0"],
         "teradata": ["teradatasql>=16.20.0.23"],
-        "thumbnails": ["Pillow>=9.5.0, <10.0.0"],
+        "thumbnails": ["Pillow>=10.0.1, <11"],
         "vertica": ["sqlalchemy-vertica-python>=0.5.9, < 0.6"],
         "netezza": ["nzalchemy>=11.0.2"],
         "starrocks": ["starrocks>=1.0.0"],
diff --git a/superset/utils/screenshots.py b/superset/utils/screenshots.py
index 2743f85195..b88033d96a 100644
--- a/superset/utils/screenshots.py
+++ b/superset/utils/screenshots.py
@@ -196,7 +196,7 @@ class BaseScreenshot:
             logger.debug("Cropping to: %s*%s", str(img.size[0]), str(desired_width))
             img = img.crop((0, 0, img.size[0], desired_width))
         logger.debug("Resizing to %s", str(thumb_size))
-        img = img.resize(thumb_size, Image.ANTIALIAS)
+        img = img.resize(thumb_size, Image.Resampling.LANCZOS)
         new_img = BytesIO()
         if output != "png":
             img = img.convert("RGB")


(superset) 07/16: fix(plugin-chart-echarts): support numerical x-axis (#26087)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit b900cb7c3ab198b252e3b65988271b6d2b912af8
Author: Ville Brofeldt <33...@users.noreply.github.com>
AuthorDate: Fri Nov 24 07:36:32 2023 -0800

    fix(plugin-chart-echarts): support numerical x-axis (#26087)
    
    (cherry picked from commit aad67e43dbabadad9a5e4accb29ecefb39315f6e)
---
 .../plugin-chart-echarts/src/Timeseries/transformProps.ts | 15 ++++++++-------
 .../plugins/plugin-chart-echarts/src/utils/series.ts      |  9 ++++++---
 .../plugin-chart-echarts/test/utils/series.test.ts        |  9 +++++++++
 3 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
index f76c457e1c..d59da861a0 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
@@ -20,9 +20,13 @@
 import { invert } from 'lodash';
 import {
   AnnotationLayer,
+  AxisType,
+  buildCustomFormatters,
   CategoricalColorNamespace,
+  CurrencyFormatter,
   ensureIsArray,
   GenericDataType,
+  getCustomFormatter,
   getMetricLabel,
   getNumberFormatter,
   getXAxisLabel,
@@ -34,9 +38,6 @@ import {
   isTimeseriesAnnotationLayer,
   t,
   TimeseriesChartDataResponseResult,
-  buildCustomFormatters,
-  getCustomFormatter,
-  CurrencyFormatter,
 } from '@superset-ui/core';
 import {
   extractExtraMetrics,
@@ -48,8 +49,8 @@ import { ZRLineType } from 'echarts/types/src/util/types';
 import {
   EchartsTimeseriesChartProps,
   EchartsTimeseriesFormData,
-  TimeseriesChartTransformedProps,
   OrientationType,
+  TimeseriesChartTransformedProps,
 } from './types';
 import { DEFAULT_FORM_DATA } from './constants';
 import { ForecastSeriesEnum, ForecastValue, Refs } from '../types';
@@ -90,8 +91,8 @@ import {
 } from './transformers';
 import {
   StackControlsValue,
-  TIMESERIES_CONSTANTS,
   TIMEGRAIN_TO_TIMESTAMP,
+  TIMESERIES_CONSTANTS,
 } from '../constants';
 import { getDefaultTooltip } from '../utils/tooltip';
 import { getYAxisFormatter } from '../utils/getYAxisFormatter';
@@ -446,13 +447,13 @@ export default function transformProps(
       rotate: xAxisLabelRotation,
     },
     minInterval:
-      xAxisType === 'time' && timeGrainSqla
+      xAxisType === AxisType.time && timeGrainSqla
         ? TIMEGRAIN_TO_TIMESTAMP[timeGrainSqla]
         : 0,
   };
   let yAxis: any = {
     ...defaultYAxis,
-    type: logAxis ? 'log' : 'value',
+    type: logAxis ? AxisType.log : AxisType.value,
     min,
     max,
     minorTick: { show: true },
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts b/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts
index 663548f25d..bd4e329d0b 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts
@@ -25,12 +25,12 @@ import {
   DTTM_ALIAS,
   ensureIsArray,
   GenericDataType,
+  LegendState,
+  normalizeTimestamp,
   NumberFormats,
   NumberFormatter,
-  TimeFormatter,
   SupersetTheme,
-  normalizeTimestamp,
-  LegendState,
+  TimeFormatter,
   ValueFormatter,
 } from '@superset-ui/core';
 import { SortSeriesType } from '@superset-ui/chart-controls';
@@ -512,6 +512,9 @@ export function getAxisType(dataType?: GenericDataType): AxisType {
   if (dataType === GenericDataType.TEMPORAL) {
     return AxisType.time;
   }
+  if (dataType === GenericDataType.NUMERIC) {
+    return AxisType.value;
+  }
   return AxisType.category;
 }
 
diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts
index 75faee93e5..927ee49e8c 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts
@@ -18,6 +18,7 @@
  */
 import { SortSeriesType } from '@superset-ui/chart-controls';
 import {
+  AxisType,
   DataRecord,
   GenericDataType,
   getNumberFormatter,
@@ -31,6 +32,7 @@ import {
   extractSeries,
   extractShowValueIndexes,
   formatSeriesName,
+  getAxisType,
   getChartPadding,
   getLegendProps,
   getOverMaxHiddenFormatter,
@@ -870,3 +872,10 @@ test('calculateLowerLogTick', () => {
   expect(calculateLowerLogTick(2)).toEqual(1);
   expect(calculateLowerLogTick(0.005)).toEqual(0.001);
 });
+
+test('getAxisType', () => {
+  expect(getAxisType(GenericDataType.TEMPORAL)).toEqual(AxisType.time);
+  expect(getAxisType(GenericDataType.NUMERIC)).toEqual(AxisType.value);
+  expect(getAxisType(GenericDataType.BOOLEAN)).toEqual(AxisType.category);
+  expect(getAxisType(GenericDataType.STRING)).toEqual(AxisType.category);
+});


(superset) 13/16: fix(annotations): time grain column (#26140)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit a4c5340c7e15563e1ef7e441eb300298b0222453
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Thu Nov 30 11:13:12 2023 -0500

    fix(annotations): time grain column (#26140)
    
    (cherry picked from commit cff473f825825a419eb544d56960ce3a8a541592)
---
 .../src/components/Chart/chartAction.js            |  9 ++-
 .../src/components/Chart/chartActions.test.js      | 67 ++++++++++++++++++++++
 2 files changed, 73 insertions(+), 3 deletions(-)

diff --git a/superset-frontend/src/components/Chart/chartAction.js b/superset-frontend/src/components/Chart/chartAction.js
index 6db969ebb9..5dd4a4e04d 100644
--- a/superset-frontend/src/components/Chart/chartAction.js
+++ b/superset-frontend/src/components/Chart/chartAction.js
@@ -271,9 +271,12 @@ export function runAnnotationQuery({
       return Promise.resolve();
     }
 
-    const granularity = fd.time_grain_sqla || fd.granularity;
-    fd.time_grain_sqla = granularity;
-    fd.granularity = granularity;
+    // In the original formData the `granularity` attribute represents the time grain (eg
+    // `P1D`), but in the request payload it corresponds to the name of the column where
+    // the time grain should be applied (eg, `Date`), so we need to move things around.
+    fd.time_grain_sqla = fd.time_grain_sqla || fd.granularity;
+    fd.granularity = fd.granularity_sqla;
+
     const overridesKeys = Object.keys(annotation.overrides);
     if (overridesKeys.includes('since') || overridesKeys.includes('until')) {
       annotation.overrides = {
diff --git a/superset-frontend/src/components/Chart/chartActions.test.js b/superset-frontend/src/components/Chart/chartActions.test.js
index b44ca7c8d7..b3a6fed9f5 100644
--- a/superset-frontend/src/components/Chart/chartActions.test.js
+++ b/superset-frontend/src/components/Chart/chartActions.test.js
@@ -21,6 +21,7 @@ import fetchMock from 'fetch-mock';
 import sinon from 'sinon';
 
 import * as chartlib from '@superset-ui/core';
+import { SupersetClient } from '@superset-ui/core';
 import { LOG_EVENT } from 'src/logger/actions';
 import * as exploreUtils from 'src/explore/exploreUtils';
 import * as actions from 'src/components/Chart/chartAction';
@@ -233,4 +234,70 @@ describe('chart actions', () => {
       expect(json.result[0].value.toString()).toEqual(expectedBigNumber);
     });
   });
+
+  describe('runAnnotationQuery', () => {
+    const mockDispatch = jest.fn();
+    const mockGetState = () => ({
+      charts: {
+        chartKey: {
+          latestQueryFormData: {
+            time_grain_sqla: 'P1D',
+            granularity_sqla: 'Date',
+          },
+        },
+      },
+    });
+
+    beforeEach(() => {
+      jest.clearAllMocks();
+    });
+
+    it('should dispatch annotationQueryStarted and annotationQuerySuccess on successful query', async () => {
+      const annotation = {
+        name: 'Holidays',
+        annotationType: 'EVENT',
+        sourceType: 'NATIVE',
+        color: null,
+        opacity: '',
+        style: 'solid',
+        width: 1,
+        showMarkers: false,
+        hideLine: false,
+        value: 1,
+        overrides: {
+          time_range: null,
+        },
+        show: true,
+        showLabel: false,
+        titleColumn: '',
+        descriptionColumns: [],
+        timeColumn: '',
+        intervalEndColumn: '',
+      };
+      const key = undefined;
+
+      const postSpy = jest.spyOn(SupersetClient, 'post');
+      postSpy.mockImplementation(() =>
+        Promise.resolve({ json: { result: [] } }),
+      );
+      const buildV1ChartDataPayloadSpy = jest.spyOn(
+        exploreUtils,
+        'buildV1ChartDataPayload',
+      );
+
+      const queryFunc = actions.runAnnotationQuery({ annotation, key });
+      await queryFunc(mockDispatch, mockGetState);
+
+      expect(buildV1ChartDataPayloadSpy).toHaveBeenCalledWith({
+        formData: {
+          granularity: 'Date',
+          granularity_sqla: 'Date',
+          time_grain_sqla: 'P1D',
+        },
+        force: false,
+        resultFormat: 'json',
+        resultType: 'full',
+      });
+    });
+  });
 });


(superset) 01/16: fix(horizontal filter bar filter labels): Increase max-width to 96px (#25883)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 44fb6b555143e534528400bfb4d9061efc7eab09
Author: Ross Mabbett <92...@users.noreply.github.com>
AuthorDate: Mon Nov 20 14:24:02 2023 -0500

    fix(horizontal filter bar filter labels): Increase max-width to 96px (#25883)
    
    Co-authored-by: Elizabeth Thompson <es...@gmail.com>
    (cherry picked from commit e7797b65d1dadc1c466d1852747657b0aade9690)
---
 .../components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx  | 1 -
 1 file changed, 1 deletion(-)

diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx
index 37739e5370..96f51f5359 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx
@@ -49,7 +49,6 @@ const VerticalFilterControlTitle = styled.h4`
 const HorizontalFilterControlTitle = styled(VerticalFilterControlTitle)`
   font-weight: ${({ theme }) => theme.typography.weights.normal};
   color: ${({ theme }) => theme.colors.grayscale.base};
-  max-width: ${({ theme }) => theme.gridUnit * 15}px;
   ${truncationCSS};
 `;
 


(superset) 03/16: fix: Remove annotation Fuzzy to get french translation (#26010)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 79d8865ac67936a6663b00428b0dddd267f7bc04
Author: aehanno <10...@users.noreply.github.com>
AuthorDate: Tue Nov 21 11:53:26 2023 -0500

    fix: Remove annotation Fuzzy to get french translation (#26010)
    
    (cherry picked from commit 25a737e83cdabb3158cd3dacda7c5d5332e2c3d2)
---
 superset/translations/fr/LC_MESSAGES/messages.json | 75 ++++++++++++-----
 superset/translations/fr/LC_MESSAGES/messages.po   | 95 +++++++++-------------
 2 files changed, 92 insertions(+), 78 deletions(-)

diff --git a/superset/translations/fr/LC_MESSAGES/messages.json b/superset/translations/fr/LC_MESSAGES/messages.json
index 5c000012fa..4af7aad83d 100644
--- a/superset/translations/fr/LC_MESSAGES/messages.json
+++ b/superset/translations/fr/LC_MESSAGES/messages.json
@@ -100,7 +100,7 @@
       "1H": [""],
       "1M": [""],
       "1T": [""],
-      "2 years ago": ["il y a 2 ans"],
+      "2 years ago": ["Il y a 2 ans"],
       "2/98 percentiles": [""],
       "28 days ago": [""],
       "2D": [""],
@@ -226,6 +226,7 @@
       "Add calculated temporal columns to dataset in \"Edit datasource\" modal": [
         ""
       ],
+      "Add cross-filter": ["Ajouter un filtre"],
       "Add custom scoping": [""],
       "Add delivery method": ["Ajouter méthode de livraison"],
       "Add filter": ["Ajouter un filtre"],
@@ -556,6 +557,8 @@
         ""
       ],
       "Append": ["Ajouter"],
+      "Applied filters (%d)": ["Filtres appliqués (%d)"],
+      "Applied filters: %s": ["Filtres appliqué: %s"],
       "Applied rolling window did not return any data. Please make sure the source query satisfies the minimum periods defined in the rolling window.": [
         "La fenêtre glissante appliquée n'a pas retourné de données. Assurez-vous que la requête source satisfasse les périodes minimum définies dans la fenêtre glissante."
       ],
@@ -630,6 +633,7 @@
       "Batch editing %d filters:": ["Edition Batch %d filtres:"],
       "Battery level over time": [""],
       "Be careful.": ["Faites attention."],
+      "Before": ["Avant"],
       "Big Number": ["Gros nombre"],
       "Big Number Font Size": [""],
       "Big Number with Trendline": ["Gros nombre avec tendance"],
@@ -1088,9 +1092,10 @@
       ],
       "Creator": ["Créateur"],
       "Cross-filter will be applied to all of the charts that use this dataset.": [
-        ""
+        "Le filtre va être appliqué à tous les graphiques qui utilise cet ensemble de données"
       ],
       "Currently rendered: %s": [""],
+      "Custom": ["Personnalisée"],
       "Custom Plugin": ["Plugin custom"],
       "Custom Plugins": ["Plugins custom"],
       "Custom SQL": ["SQL personnalisé"],
@@ -1259,6 +1264,7 @@
       "Datetime format": ["Format Datetime"],
       "Day": ["Jour"],
       "Day (freq=D)": [""],
+      "Days %s": ["Jours %s"],
       "Db engine did not return all queried columns": [
         "La base de données n'a pas retourné toutes les colonnes demandées"
       ],
@@ -1415,6 +1421,7 @@
       "Divider": ["Diviseur"],
       "Do you want a donut or a pie?": [""],
       "Documentation": ["Documentation"],
+      "Download": ["Télécharger"],
       "Download as image": ["Télécharger comme image"],
       "Download to CSV": ["Télécharger en CSV"],
       "Draft": ["Brouillon"],
@@ -1429,6 +1436,7 @@
       "Drill by": [""],
       "Drill by is not available for this data point": [""],
       "Drill by is not yet supported for this chart type": [""],
+      "Drill by: %s": ["Trier par %s"],
       "Drill to detail": [""],
       "Drill to detail by": [""],
       "Drill to detail by value is not yet supported for this chart type.": [
@@ -1635,7 +1643,10 @@
       "Export": ["Exporter"],
       "Export dashboards?": ["Exporter les tableaux de bords ?"],
       "Export query": ["Exporter la requête"],
-      "Export to YAML": ["Exporter en YAML"],
+      "Export to .CSV": ["Exporter au format CSV"],
+      "Export to .JSON": ["Exporter au format JSON"],
+      "Export to Excel": ["Exporter vers Excel"],
+      "Export to YAML": ["Exporter au format YAML"],
       "Export to YAML?": ["Exporter en YAML?"],
       "Export to original .CSV": [""],
       "Export to pivoted .CSV": [""],
@@ -1818,6 +1829,7 @@
       "Host": [""],
       "Hostname or IP address": ["Nom d'hôte ou adresse IP"],
       "Hour": ["Heure"],
+      "Hours %s": ["Heures %s"],
       "Hours offset": ["Offset des heures"],
       "How do you want to enter service account credentials?": [
         "Comment voulez-vous entrer les informations de connexion du compte de service ?"
@@ -1981,9 +1993,11 @@
       "Labels for the marker lines": [""],
       "Labels for the markers": [""],
       "Labels for the ranges": [""],
+      "Last": ["Dernier"],
       "Last Changed": ["Dernière modification"],
       "Last Modified": ["Dernière modification"],
       "Last Updated %s": ["Dernière mise à jour %s"],
+      "Last Updated %s by %s": ["Dernière mise à jour %s"],
       "Last modified": ["Dernière modification"],
       "Last modified by %s": ["Dernière modification par %s"],
       "Last run": ["Dernière exécution"],
@@ -2142,6 +2156,7 @@
       "Minimum value on the gauge axis": [""],
       "Minor Split Line": [""],
       "Minute": ["Minute"],
+      "Minutes %s": ["Minutes %s"],
       "Missing dataset": ["Jeu de données manquant"],
       "Mixed Time-Series": [""],
       "Modified": ["Modifié"],
@@ -2150,6 +2165,7 @@
       "Modified columns: %s": ["Colonnes modifiées : %s"],
       "Monday": ["Lundi"],
       "Month": ["Mois"],
+      "Months %s": ["Mois %s"],
       "Move only": [""],
       "Moves the given set of dates by a specified interval.": [
         "Décale l'ensemble de dates d'un intervalle spécifié."
@@ -2235,6 +2251,7 @@
       "No filter": ["Pas de filtre"],
       "No filter is selected.": ["Pas de filtre sélectionné."],
       "No form settings were maintained": [""],
+      "No matching records found": ["Aucun enregistrement trouvé"],
       "No records found": ["Aucun enregistrement trouvé"],
       "No results found": ["Aucun résultat trouvé"],
       "No results match your filter criteria": [""],
@@ -2265,6 +2282,7 @@
       "Nothing triggered": ["Rien déclenché"],
       "Notification method": ["Méthode de notification"],
       "November": ["Novembre"],
+      "Now": ["Maintenant"],
       "Null or Empty": ["Null ou Vide"],
       "Null values": ["Valeurs NULL"],
       "Number bounds used for color encoding from red to blue.\n               Reverse the numbers for blue to red. To get pure red or blue,\n               you can enter either only min or max.": [
@@ -2590,6 +2608,7 @@
       "Python datetime string pattern": ["Python datetime string pattern"],
       "QUERY DATA IN SQL LAB": [""],
       "Quarter": ["Trimestre"],
+      "Quarters %s": ["Trimestres %s"],
       "Query": ["Requête"],
       "Query %s: %s": [""],
       "Query History": ["Historiques des requêtes"],
@@ -2652,8 +2671,10 @@
       "Refresh frequency": ["Fréquence de rafraichissement"],
       "Refresh interval": ["Intervalle d'actualisation"],
       "Refresh the default values": ["Rafraichir les valeurs par défaut"],
+      "Refreshing charts": ["Rafraîchissement en cours"],
       "Regular": [""],
       "Relationships between community channels": [""],
+      "Relative Date/Time": ["Date/Heure Relative"],
       "Relative period": ["Période relative"],
       "Relative quantity": ["Quantité relative"],
       "Remind me in 24 hours": ["Me le rappeler dans 24 heures"],
@@ -2730,6 +2751,7 @@
       "Resource already has an attached report.": [""],
       "Restore Filter": ["Restaurer le Filtre"],
       "Results": ["Résultats"],
+      "Results %s": ["Résultats"],
       "Results backend is not configured.": [
         "Le backend des résultats n'est pas configuré."
       ],
@@ -2884,6 +2906,7 @@
       "Secondary y-axis Bounds": [""],
       "Secondary y-axis format": [""],
       "Secondary y-axis title": [""],
+      "Seconds %s": ["Secondes %s"],
       "Secure Extra": ["Sécurité"],
       "Secure extra": ["Sécurité"],
       "Security": ["Sécurité"],
@@ -2894,7 +2917,7 @@
       "Select": ["Sélectionner"],
       "Select ...": ["Sélectionner..."],
       "Select Delivery Method": ["Choisir la méthode de livraison"],
-      "Select Viz Type": ["Selectionner un type de visualisation"],
+      "Select Viz Type": ["Sélectionner un type de visualisation"],
       "Select a Columnar file to be uploaded to a database.": [
         "Sélectionner un fichier en colonne à téléverser dans une base de données."
       ],
@@ -2904,7 +2927,7 @@
       "Select a column": ["Sélectionner une colonne"],
       "Select a dashboard": ["Sélectionner un tableau de bord"],
       "Select a database to upload the file to": [""],
-      "Select a visualization type": ["Selectionner un type de visualisation"],
+      "Select a visualization type": ["Sélectionner un type de visualisation"],
       "Select aggregate options": ["Sélectionner les options d’agrégat"],
       "Select any columns for metadata inspection": [""],
       "Select color scheme": ["Sélectionner un schéma de couleurs"],
@@ -2912,17 +2935,17 @@
       "Select databases require additional fields to be completed in the Advanced tab to successfully connect the database. Learn what requirements your databases has ": [
         ""
       ],
-      "Select filter": ["Selectionner un filtre"],
+      "Select filter": ["Sélectionner un filtre"],
       "Select filter plugin using AntD": [""],
       "Select first filter value by default": [
-        "Selectionne la première valeur du filtre par défaut"
+        "Sélectionne la première valeur du filtre par défaut"
       ],
       "Select operator": ["Sélectionner l'opérateur"],
       "Select or type a value": ["Sélectionner ou renseigner une valeur"],
       "Select owners": ["Sélectionner les propriétaires"],
       "Select saved metrics": ["Sélectionner les métriques sauvegardées"],
       "Select start and end date": [
-        "Selectionner la date de début et la date de fin"
+        "Sélectionner la date de début et la date de fin"
       ],
       "Select subject": ["Sélectionner un objet"],
       "Select the charts to which you want to apply cross-filters in this dashboard. Deselecting a chart will exclude it from being filtered when applying cross-filters from any chart on the dashboard. You can select \"All charts\" to apply cross-filters to all charts that use the same dataset or contain the same column name in the dashboard.": [
@@ -2936,7 +2959,7 @@
       "Select values in highlighted field(s) in the control panel. Then run the query by clicking on the %s button.": [
         ""
       ],
-      "Send as CSV": ["Envoyer comme CSV"],
+      "Send as CSV": ["Envoyer au format CSV"],
       "Send as PNG": ["Envoyer comme PNG"],
       "Send as text": ["Envoyer comme texte"],
       "Send range filter events to other charts": [""],
@@ -3082,6 +3105,7 @@
       "Sort ascending": ["Tri croissant"],
       "Sort bars by x labels.": [""],
       "Sort by": ["Trier par"],
+      "Sort by %s": ["Trier par %s"],
       "Sort columns alphabetically": ["Trier les colonnes alphabétiquement"],
       "Sort descending": ["Tri décroissant"],
       "Sort filter values": ["Trier les valeurs de filtre"],
@@ -3092,6 +3116,7 @@
       "Source SQL": ["SQL source"],
       "Sparkline": [""],
       "Spatial": ["Spatial"],
+      "Specific Date/Time": ["Date/Heure Spécifique"],
       "Specify a schema (if database flavor supports this).": [
         "Spécifier un schéma (si la base de données soutient cette fonctionnalités)."
       ],
@@ -3634,7 +3659,7 @@
         "Cela peut être soit une adresse IP (ex 127.0.0.1)  ou un nom de domaine (ex mydatabase.com)."
       ],
       "This chart applies cross-filters to charts whose datasets contain columns with the same name.": [
-        ""
+        "Ce graphique filtre automatiquement les graphiques ayant des colonnes de même nom dans leurs ensembles de données."
       ],
       "This chart has been moved to a different filter scope.": [
         "Ce graphique a été déplacé vers un autre champ d'application du filtre."
@@ -3740,6 +3765,9 @@
       "This value should be smaller than the right target value": [
         "Cette valeur devrait être plus petite que la valeur cible de droite"
       ],
+      "This visualization type does not support cross-filtering.": [
+        "Ce type de visualisation ne supporte pas le cross-filtering."
+      ],
       "This visualization type is not supported.": [
         "Ce type de visualisation n'est pas supporté."
       ],
@@ -3916,6 +3944,7 @@
       "Unexpected error occurred, please check your logs for details": [
         "Erreur inattendue, consultez les logs pour plus de détails"
       ],
+      "Unexpected time range: %s": ["Intervalle de temps inattendu: %s"],
       "Unknown": ["Erreur inconnue"],
       "Unknown MySQL server host \"%(hostname)s\".": [
         "Hôte MySQL \"%(hostname)s\" inconnu."
@@ -4134,6 +4163,7 @@
       "Week_ending Sunday": ["Semaine terminant le dimanche"],
       "Weekly Report for %s": [""],
       "Weekly seasonality": [""],
+      "Weeks %s": ["Semaines %s"],
       "What should be shown on the label?": [""],
       "When `Calculation type` is set to \"Percentage change\", the Y Axis Format is forced to `.1%`": [
         "Lorsque `Type de calcul` vaut \"Pourcentage de changement\", le format de l'axe Y est à forcé à `.1%`"
@@ -4283,6 +4313,7 @@
       "Year": ["Année"],
       "Year (freq=AS)": [""],
       "Yearly seasonality": [""],
+      "Years %s": ["Année %s"],
       "Yes": ["Oui"],
       "Yes, cancel": ["Oui, annuler"],
       "Yes, overwrite changes": [""],
@@ -4304,7 +4335,9 @@
       "You can add the components in the": [
         "Vous pouvez ajouter les composants via le"
       ],
-      "You can also just click on the chart to apply cross-filter.": [""],
+      "You can also just click on the chart to apply cross-filter.": [
+        "Vous pouvez juste cliquer sur le graphique pour appliquer le filtre"
+      ],
       "You can choose to display all charts that you have access to or only the ones you own.\n              Your filter selection will be saved and remain active until you choose to change it.": [
         ""
       ],
@@ -4314,7 +4347,9 @@
       "You can preview the list of dashboards in the chart settings dropdown.": [
         ""
       ],
-      "You can't apply cross-filter on this data point.": [""],
+      "You can't apply cross-filter on this data point.": [
+        "Vous ne pouvez pas ajouter de filtre sur ce point de donnée"
+      ],
       "You cannot delete the last temporal filter as it's used for time range filters in dashboards.": [
         ""
       ],
@@ -4440,6 +4475,7 @@
       "aggregate": ["agrégat"],
       "alert": ["alerte"],
       "alerts": ["alertes"],
+      "all": ["Tous"],
       "also copy (duplicate) charts": [
         "copier également les graphiques (dupliquer)"
       ],
@@ -4525,6 +4561,11 @@
       "json isn't valid": ["le json n'est pas valide"],
       "key a-z": [""],
       "key z-a": [""],
+      "last day": ["hier"],
+      "last month": ["le mois dernier"],
+      "last quarter": ["le trimestre dernier"],
+      "last week": ["la semaine dernière"],
+      "last year": ["l'année dernière"],
       "latest partition:": ["dernière partition :"],
       "less than {min} {name}": [""],
       "log": ["log"],
@@ -4591,18 +4632,10 @@
       "y: values are normalized within each row": [""],
       "year": ["année"],
       "zoom area": [""],
-      "No matching records found": ["Aucun résultat trouvé"],
-      "Seconds %s": ["%s secondes"],
-      "Minutes %s": ["%s minutes "],
       "10 seconds": ["10 secondes"],
       "6 hours": ["6 heures"],
       "12 hours": ["12 heures"],
-      "24 hours": ["24 heures"],
-      "Last day": ["Hier"],
-      "Last week": ["La semaine derniere"],
-      "Last month": ["Le mois dernier"],
-      "Last quarter": ["Le trimestre dernier"],
-      "Last year": ["L'année dernière"]
+      "24 hours": ["24 heures"]
     }
   }
 }
diff --git a/superset/translations/fr/LC_MESSAGES/messages.po b/superset/translations/fr/LC_MESSAGES/messages.po
index 6c4cdd69c4..4897d75620 100644
--- a/superset/translations/fr/LC_MESSAGES/messages.po
+++ b/superset/translations/fr/LC_MESSAGES/messages.po
@@ -1204,7 +1204,6 @@ msgid "Add calculated temporal columns to dataset in \"Edit datasource\" modal"
 msgstr ""
 
 #: superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx:197
-#, fuzzy
 msgid "Add cross-filter"
 msgstr "Ajouter un filtre"
 
@@ -2400,14 +2399,14 @@ msgid "Applied cross-filters (%d)"
 msgstr "Filtres croisés appliqués (%d)"
 
 #: superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/index.tsx:149
-#, fuzzy, python-format
+#, python-format
 msgid "Applied filters (%d)"
 msgstr "Filtres appliqués (%d)"
 
 #: superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx:260
-#, fuzzy, python-format
+#, python-format
 msgid "Applied filters: %s"
-msgstr "Filtres appliqués (%d)"
+msgstr "Filtres appliqué: %s"
 
 #: superset/viz.py:250
 msgid ""
@@ -2797,7 +2796,6 @@ msgstr "Faites attention."
 
 #: superset-frontend/src/components/AlteredSliceTag/index.jsx:178
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:75
-#, fuzzy
 msgid "Before"
 msgstr "Avant"
 
@@ -4921,7 +4919,7 @@ msgstr "Action"
 
 #: superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx:152
 msgid "Cross-filter will be applied to all of the charts that use this dataset."
-msgstr ""
+msgstr "Le filtre va être appliqué à tous les graphiques qui utilise cet ensemble de données"
 
 #: superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx:164
 #, fuzzy
@@ -4956,7 +4954,6 @@ msgid "Currently rendered: %s"
 msgstr ""
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:33
-#, fuzzy
 msgid "Custom"
 msgstr "Personnalisée"
 
@@ -5598,7 +5595,7 @@ msgid "Day (freq=D)"
 msgstr ""
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:65
-#, fuzzy, python-format
+#, python-format
 msgid "Days %s"
 msgstr "Jours %s"
 
@@ -6258,9 +6255,8 @@ msgstr "Édité"
 
 #: superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx:482
 #: superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx:292
-#, fuzzy
 msgid "Download"
-msgstr "télécharger en CSV"
+msgstr "Télécharger"
 
 #: superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/index.jsx:317
 #: superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx:512
@@ -6335,7 +6331,7 @@ msgid "Drill by is not yet supported for this chart type"
 msgstr ""
 
 #: superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx:420
-#, fuzzy, python-format
+#, python-format
 msgid "Drill by: %s"
 msgstr "Trier par %s"
 
@@ -7312,24 +7308,21 @@ msgstr "Exporter la requête"
 
 #: superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx:487
 #: superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx:316
-#, fuzzy
 msgid "Export to .CSV"
-msgstr "Exporter en YAML"
+msgstr "Exporter au format CSV"
 
 #: superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx:323
-#, fuzzy
 msgid "Export to .JSON"
-msgstr "Exporter en YAML"
+msgstr "Exporter au format JSON"
 
 #: superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx:506
 #: superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx:335
-#, fuzzy
 msgid "Export to Excel"
-msgstr "Exporter en YAML"
+msgstr "Exporter vers Excel"
 
 #: superset/views/base.py:607
 msgid "Export to YAML"
-msgstr "Exporter en YAML"
+msgstr "Exporter au format YAML"
 
 #: superset/views/base.py:607
 msgid "Export to YAML?"
@@ -8251,7 +8244,7 @@ msgid "Hour"
 msgstr "Heure"
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:64
-#, fuzzy, python-format
+#, python-format
 msgid "Hours %s"
 msgstr "Heures %s"
 
@@ -9038,9 +9031,8 @@ msgstr "Partage de requête"
 
 #: superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx:190
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:31
-#, fuzzy
 msgid "Last"
-msgstr "à"
+msgstr "Dernier"
 
 #: superset/connectors/sqla/views.py:388 superset/views/database/mixins.py:190
 msgid "Last Changed"
@@ -9056,7 +9048,7 @@ msgid "Last Updated %s"
 msgstr "Dernière mise à jour %s"
 
 #: superset-frontend/src/dashboard/components/OverwriteConfirm/OverwriteConfirmModal.tsx:182
-#, fuzzy, python-format
+#, python-format
 msgid "Last Updated %s by %s"
 msgstr "Dernière mise à jour %s"
 
@@ -10040,7 +10032,7 @@ msgid "Minute"
 msgstr "Minute"
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:63
-#, fuzzy, python-format
+#, python-format
 msgid "Minutes %s"
 msgstr "Minutes %s"
 
@@ -10106,7 +10098,7 @@ msgid "Month"
 msgstr "Mois"
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:67
-#, fuzzy, python-format
+#, python-format
 msgid "Months %s"
 msgstr "Mois %s"
 
@@ -10571,7 +10563,6 @@ msgid "No global filters are currently added"
 msgstr "Aucun filtre ajouté"
 
 #: superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx:204
-#, fuzzy
 msgid "No matching records found"
 msgstr "Aucun enregistrement trouvé"
 
@@ -10792,7 +10783,6 @@ msgid "November"
 msgstr "Novembre"
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:89
-#, fuzzy
 msgid "Now"
 msgstr "Maintenant"
 
@@ -12208,7 +12198,7 @@ msgid "Quarter"
 msgstr "Trimestre"
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:68
-#, fuzzy, python-format
+#, python-format
 msgid "Quarters %s"
 msgstr "Trimestres %s"
 
@@ -12586,9 +12576,8 @@ msgid "Refresh the default values"
 msgstr "Rafraichir les valeurs par défaut"
 
 #: superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/index.jsx:163
-#, fuzzy
 msgid "Refreshing charts"
-msgstr "Une erreur s'est produite durant la récupération des tableaux de bord : %s"
+msgstr "Rafraîchissement en cours"
 
 #: superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx:175
 #, fuzzy
@@ -12636,7 +12625,6 @@ msgid "Relationships between community channels"
 msgstr ""
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:88
-#, fuzzy
 msgid "Relative Date/Time"
 msgstr "Date/Heure Relative"
 
@@ -12931,7 +12919,7 @@ msgstr "Résultats"
 #: superset-frontend/src/components/Chart/DrillBy/useResultsTableView.tsx:58
 #: superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx:212
 #: superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx:84
-#, fuzzy, python-format
+#, python-format
 msgid "Results %s"
 msgstr "Résultats"
 
@@ -13802,9 +13790,9 @@ msgid "Secondary y-axis title"
 msgstr ""
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:62
-#, fuzzy, python-format
+#, python-format
 msgid "Seconds %s"
-msgstr "%s secondes"
+msgstr "Secondes %s"
 
 #: superset/views/database/mixins.py:194
 msgid "Secure Extra"
@@ -13869,7 +13857,7 @@ msgstr "Choisir la méthode de livraison"
 
 #: superset-frontend/src/explore/components/controls/VizTypeControl/FastVizSwitcher.tsx:94
 msgid "Select Viz Type"
-msgstr "Selectionner un type de visualisation"
+msgstr "Sélectionner un type de visualisation"
 
 #: superset/views/database/forms.py:425
 msgid "Select a Columnar file to be uploaded to a database."
@@ -13930,7 +13918,7 @@ msgstr ""
 
 #: superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx:130
 msgid "Select a visualization type"
-msgstr "Selectionner un type de visualisation"
+msgstr "Sélectionner un type de visualisation"
 
 #: superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.jsx:331
 msgid "Select aggregate options"
@@ -14011,7 +13999,7 @@ msgstr "Selectionner un filtre"
 #: superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx:318
 #: superset-frontend/src/filters/components/Select/index.ts:28
 msgid "Select filter"
-msgstr "Selectionner un filtre"
+msgstr "Sélectionner un filtre"
 
 #: superset-frontend/src/filters/components/Select/index.ts:29
 msgid "Select filter plugin using AntD"
@@ -14019,7 +14007,7 @@ msgstr ""
 
 #: superset-frontend/src/filters/components/Select/controlPanel.ts:104
 msgid "Select first filter value by default"
-msgstr "Selectionne la première valeur du filtre par défaut"
+msgstr "Sélectionne la première valeur du filtre par défaut"
 
 #: superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx:362
 msgid "Select operator"
@@ -14056,7 +14044,7 @@ msgstr "Sélectionner un schéma de couleurs"
 
 #: superset-frontend/src/visualizations/FilterBox/FilterBox.jsx:307
 msgid "Select start and end date"
-msgstr "Selectionner la date de début et la date de fin"
+msgstr "Sélectionner la date de début et la date de fin"
 
 #: superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx:334
 msgid "Select subject"
@@ -14113,7 +14101,7 @@ msgstr ""
 
 #: superset-frontend/src/features/alerts/AlertReportModal.tsx:408
 msgid "Send as CSV"
-msgstr "Envoyer comme CSV"
+msgstr "Envoyer au format CSV"
 
 #: superset-frontend/src/features/alerts/AlertReportModal.tsx:407
 msgid "Send as PNG"
@@ -14831,7 +14819,7 @@ msgid "Sort by"
 msgstr "Trier par"
 
 #: superset-frontend/src/dashboard/components/SliceAdder.jsx:362
-#, fuzzy, python-format
+#, python-format
 msgid "Sort by %s"
 msgstr "Trier par %s"
 
@@ -14919,7 +14907,6 @@ msgid "Spatial"
 msgstr "Spatial"
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:87
-#, fuzzy
 msgid "Specific Date/Time"
 msgstr "Date/Heure Spécifique"
 
@@ -16818,7 +16805,8 @@ msgstr ""
 msgid ""
 "This chart applies cross-filters to charts whose datasets contain columns"
 " with the same name."
-msgstr ""
+msgstr "Ce graphique filtre automatiquement les graphiques ayant des colonnes de même nom dans leurs"
+" ensembles de données."
 
 #: superset-frontend/src/dashboard/actions/dashboardLayout.js:260
 msgid "This chart has been moved to a different filter scope."
@@ -17077,9 +17065,8 @@ msgid "This value should be smaller than the right target value"
 msgstr "Cette valeur devrait être plus petite que la valeur cible de droite"
 
 #: superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx:171
-#, fuzzy
 msgid "This visualization type does not support cross-filtering."
-msgstr "Ce type de visualisation n'est pas supporté."
+msgstr "Ce type de visualisation ne supporte pas le cross-filtering."
 
 #: superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx:64
 msgid "This visualization type is not supported."
@@ -17931,9 +17918,9 @@ msgid "Unexpected error: "
 msgstr "Erreur inattendue"
 
 #: superset/views/api.py:108
-#, fuzzy, python-format
+#, python-format
 msgid "Unexpected time range: %s"
-msgstr "Erreur inattendue"
+msgstr "Intervalle de temps inattendu: %s"
 
 #: superset-frontend/src/features/home/ActivityTable.tsx:86
 msgid "Unknown"
@@ -18701,7 +18688,7 @@ msgid "Weekly seasonality"
 msgstr ""
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:66
-#, fuzzy, python-format
+#, python-format
 msgid "Weeks %s"
 msgstr "Semaines %s"
 
@@ -19350,7 +19337,7 @@ msgid "Yearly seasonality"
 msgstr ""
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:69
-#, fuzzy, python-format
+#, python-format
 msgid "Years %s"
 msgstr "Année %s"
 
@@ -19452,7 +19439,7 @@ msgstr "Vous pouvez ajouter les composants via mode edition"
 
 #: superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx:157
 msgid "You can also just click on the chart to apply cross-filter."
-msgstr ""
+msgstr "Vous pouvez juste cliquer sur le graphique pour appliquer le filtre"
 
 #: superset-frontend/src/dashboard/components/SliceAdder.jsx:386
 msgid ""
@@ -19477,7 +19464,7 @@ msgstr ""
 
 #: superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx:178
 msgid "You can't apply cross-filter on this data point."
-msgstr ""
+msgstr "Vous ne pouvez pas ajouter de filtre sur ce point de donnée"
 
 #: superset-frontend/src/explore/components/ControlPanelsContainer.tsx:501
 msgid ""
@@ -19827,7 +19814,6 @@ msgstr "alertes"
 #: superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx:160
 #: superset-frontend/src/components/Chart/DrillDetail/DrillDetailMenuItems.tsx:205
 #: superset-frontend/src/explore/controls.jsx:254
-#, fuzzy
 msgid "all"
 msgstr "Tous"
 
@@ -20421,27 +20407,22 @@ msgid "label"
 msgstr "Label"
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:39
-#, fuzzy
 msgid "last day"
 msgstr "hier"
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:41
-#, fuzzy
 msgid "last month"
 msgstr "le mois dernier"
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:42
-#, fuzzy
 msgid "last quarter"
 msgstr "le trimestre dernier"
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:40
-#, fuzzy
 msgid "last week"
-msgstr "la semaine derniere"
+msgstr "la semaine dernière"
 
 #: superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts:43
-#, fuzzy
 msgid "last year"
 msgstr "l'année dernière"
 


(superset) 09/16: fix: flaky test_explore_json_async test v2 (#26106)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit a3212ccba875cf25653f74a1143f6bb0e999b90c
Author: Ville Brofeldt <33...@users.noreply.github.com>
AuthorDate: Tue Nov 28 05:21:13 2023 -0800

    fix: flaky test_explore_json_async test v2 (#26106)
    
    (cherry picked from commit 91a8b69d365789833b6b9698df3b3ae95b34629e)
---
 tests/integration_tests/core_tests.py | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/tests/integration_tests/core_tests.py b/tests/integration_tests/core_tests.py
index 193cc57031..455dfe6305 100644
--- a/tests/integration_tests/core_tests.py
+++ b/tests/integration_tests/core_tests.py
@@ -840,10 +840,16 @@ class TestCore(SupersetTestCase, InsertChartMixin):
         keys = list(data.keys())
 
         # If chart is cached, it will return 200, otherwise 202
-        self.assertTrue(rv.status_code in {200, 202})
-        self.assertCountEqual(
-            keys, ["channel_id", "job_id", "user_id", "status", "errors", "result_url"]
-        )
+        assert rv.status_code in {200, 202}
+        if rv.status_code == 202:
+            assert keys == [
+                "channel_id",
+                "job_id",
+                "user_id",
+                "status",
+                "errors",
+                "result_url",
+            ]
 
     @pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
     @mock.patch.dict(


(superset) 04/16: fix: Optimize fetching samples logic (#26060)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 79167785852af0022ea4c4ac6a60288f379be4fb
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Tue Nov 21 13:26:02 2023 -0800

    fix: Optimize fetching samples logic (#26060)
    
    (cherry picked from commit bd8951e9586fb3bb36c13f394bc257bda1a851e3)
---
 superset/views/datasource/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/superset/views/datasource/utils.py b/superset/views/datasource/utils.py
index e529427898..cb58d3aad9 100644
--- a/superset/views/datasource/utils.py
+++ b/superset/views/datasource/utils.py
@@ -114,7 +114,7 @@ def get_samples(  # pylint: disable=too-many-arguments
         sample_data = samples_instance.get_payload()["queries"][0]
 
         if sample_data.get("status") == QueryStatus.FAILED:
-            QueryCacheManager.delete(sample_data.get("cache_key"), CacheRegion.DATA)
+            QueryCacheManager.delete(count_star_data.get("cache_key"), CacheRegion.DATA)
             raise DatasetSamplesFailedError(sample_data.get("error"))
 
         sample_data["page"] = page


(superset) 06/16: fix: Flaky test_explore_json_async test (#26059)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit ea65c2467cee28d2e5a13ed1ec0cc65e71f11127
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Wed Nov 22 09:11:09 2023 -0300

    fix: Flaky test_explore_json_async test (#26059)
    
    Co-authored-by: John Bodley <45...@users.noreply.github.com>
    (cherry picked from commit 2b88225ee113062ad1c108e28a8b41a7a04a0a1a)
---
 tests/integration_tests/core_tests.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/integration_tests/core_tests.py b/tests/integration_tests/core_tests.py
index 191d9dc2d0..193cc57031 100644
--- a/tests/integration_tests/core_tests.py
+++ b/tests/integration_tests/core_tests.py
@@ -839,7 +839,8 @@ class TestCore(SupersetTestCase, InsertChartMixin):
         data = json.loads(rv.data.decode("utf-8"))
         keys = list(data.keys())
 
-        self.assertEqual(rv.status_code, 202)
+        # If chart is cached, it will return 200, otherwise 202
+        self.assertTrue(rv.status_code in {200, 202})
         self.assertCountEqual(
             keys, ["channel_id", "job_id", "user_id", "status", "errors", "result_url"]
         )


(superset) 14/16: fix: set label on adhoc column should persist (#26154)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit ec6d31c817c03e93bb42bd1b5a24b66d454d0d54
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Fri Dec 1 08:40:52 2023 -0500

    fix: set label on adhoc column should persist (#26154)
    
    (cherry picked from commit b2ea97a98484e18eee760b7a2914926143918231)
---
 .../ColumnSelectPopover.test.tsx                   | 77 ++++++++++++++++++++++
 .../DndColumnSelectControl/ColumnSelectPopover.tsx | 39 +++++++++--
 .../ColumnSelectPopoverTrigger.tsx                 | 13 ++--
 3 files changed, 121 insertions(+), 8 deletions(-)

diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.test.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.test.tsx
new file mode 100644
index 0000000000..e7ff7cd9a7
--- /dev/null
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.test.tsx
@@ -0,0 +1,77 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import React from 'react';
+import { render, fireEvent } from '@testing-library/react';
+import '@testing-library/jest-dom/extend-expect';
+import { Provider } from 'react-redux';
+import configureMockStore from 'redux-mock-store';
+import thunk from 'redux-thunk';
+import { supersetTheme, ThemeProvider } from '@superset-ui/core';
+import ColumnSelectPopover from 'src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover';
+
+const middlewares = [thunk];
+const mockStore = configureMockStore(middlewares);
+
+describe('ColumnSelectPopover - onTabChange function', () => {
+  it('updates adhocColumn when switching to sqlExpression tab with custom label', () => {
+    const mockColumns = [{ column_name: 'year' }];
+    const mockOnClose = jest.fn();
+    const mockOnChange = jest.fn();
+    const mockGetCurrentTab = jest.fn();
+    const mockSetDatasetModal = jest.fn();
+    const mockSetLabel = jest.fn();
+
+    const store = mockStore({ explore: { datasource: { type: 'table' } } });
+
+    const { container, getByText } = render(
+      <Provider store={store}>
+        <ThemeProvider theme={supersetTheme}>
+          <ColumnSelectPopover
+            columns={mockColumns}
+            editedColumn={mockColumns[0]}
+            getCurrentTab={mockGetCurrentTab}
+            hasCustomLabel
+            isTemporal
+            label="Custom Label"
+            onChange={mockOnChange}
+            onClose={mockOnClose}
+            setDatasetModal={mockSetDatasetModal}
+            setLabel={mockSetLabel}
+          />
+        </ThemeProvider>
+      </Provider>,
+    );
+
+    const sqlExpressionTab = container.querySelector(
+      '#adhoc-metric-edit-tabs-tab-sqlExpression',
+    );
+    expect(sqlExpressionTab).not.toBeNull();
+    fireEvent.click(sqlExpressionTab!);
+    expect(mockGetCurrentTab).toHaveBeenCalledWith('sqlExpression');
+
+    const saveButton = getByText('Save');
+    fireEvent.click(saveButton);
+    expect(mockOnChange).toHaveBeenCalledWith({
+      label: 'Custom Label',
+      sqlExpression: 'year',
+      expressionType: 'SQL',
+    });
+  });
+});
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
index 4806e5394a..96abf36484 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
@@ -68,6 +68,7 @@ interface ColumnSelectPopoverProps {
   editedColumn?: ColumnMeta | AdhocColumn;
   onChange: (column: ColumnMeta | AdhocColumn) => void;
   onClose: () => void;
+  hasCustomLabel: boolean;
   setLabel: (title: string) => void;
   getCurrentTab: (tab: string) => void;
   label: string;
@@ -93,13 +94,14 @@ const getInitialColumnValues = (
 const ColumnSelectPopover = ({
   columns,
   editedColumn,
+  getCurrentTab,
+  hasCustomLabel,
+  isTemporal,
+  label,
   onChange,
   onClose,
   setDatasetModal,
   setLabel,
-  getCurrentTab,
-  label,
-  isTemporal,
 }: ColumnSelectPopoverProps) => {
   const datasourceType = useSelector<ExplorePageState, string | undefined>(
     state => state.explore.datasource.type,
@@ -117,6 +119,7 @@ const ColumnSelectPopover = ({
   const [selectedSimpleColumn, setSelectedSimpleColumn] = useState<
     ColumnMeta | undefined
   >(initialSimpleColumn);
+  const [selectedTab, setSelectedTab] = useState<string | null>(null);
 
   const [resizeButton, width, height] = useResizeButton(
     POPOVER_INITIAL_WIDTH,
@@ -188,7 +191,34 @@ const ColumnSelectPopover = ({
 
   useEffect(() => {
     getCurrentTab(defaultActiveTabKey);
-  }, [defaultActiveTabKey, getCurrentTab]);
+    setSelectedTab(defaultActiveTabKey);
+  }, [defaultActiveTabKey, getCurrentTab, setSelectedTab]);
+
+  useEffect(() => {
+    /* if the adhoc column is not set (because it was never edited) but the
+     * tab is selected and the label has changed, then we need to set the
+     * adhoc column manually */
+    if (
+      adhocColumn === undefined &&
+      selectedTab === 'sqlExpression' &&
+      hasCustomLabel
+    ) {
+      const sqlExpression =
+        selectedSimpleColumn?.column_name ||
+        selectedCalculatedColumn?.expression ||
+        '';
+      setAdhocColumn({ label, sqlExpression, expressionType: 'SQL' });
+    }
+  }, [
+    adhocColumn,
+    defaultActiveTabKey,
+    hasCustomLabel,
+    getCurrentTab,
+    label,
+    selectedCalculatedColumn,
+    selectedSimpleColumn,
+    selectedTab,
+  ]);
 
   const onSave = useCallback(() => {
     if (adhocColumn && adhocColumn.label !== label) {
@@ -225,6 +255,7 @@ const ColumnSelectPopover = ({
   const onTabChange = useCallback(
     tab => {
       getCurrentTab(tab);
+      setSelectedTab(tab);
       // @ts-ignore
       sqlEditorRef.current?.editor.focus();
     },
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx
index 4340317f04..341d91e616 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx
@@ -103,6 +103,7 @@ const ColumnSelectPopoverTrigger = ({
           setDatasetModal={setDatasetModal}
           onClose={handleClosePopover}
           onChange={onColumnEdit}
+          hasCustomLabel={hasCustomLabel}
           label={popoverLabel}
           setLabel={setPopoverLabel}
           getCurrentTab={getCurrentTab}
@@ -114,6 +115,7 @@ const ColumnSelectPopoverTrigger = ({
       columns,
       editedColumn,
       getCurrentTab,
+      hasCustomLabel,
       handleClosePopover,
       isTemporal,
       onColumnEdit,
@@ -121,10 +123,13 @@ const ColumnSelectPopoverTrigger = ({
     ],
   );
 
-  const onLabelChange = useCallback((e: any) => {
-    setPopoverLabel(e.target.value);
-    setHasCustomLabel(true);
-  }, []);
+  const onLabelChange = useCallback(
+    (e: any) => {
+      setPopoverLabel(e.target.value);
+      setHasCustomLabel(true);
+    },
+    [setPopoverLabel, setHasCustomLabel],
+  );
 
   const popoverTitle = useMemo(
     () => (


(superset) 05/16: fix: Prevent cached bootstrap data from leaking between users w/ same first/last name (#26023)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit ff5de2547853733254694bb9abc9796375ff684a
Author: Jack Fragassi <jf...@gmail.com>
AuthorDate: Tue Nov 21 15:39:42 2023 -0800

    fix: Prevent cached bootstrap data from leaking between users w/ same first/last name (#26023)
---
 superset/embedded/view.py         |  4 ++--
 superset/views/base.py            | 18 +++++++++++-------
 superset/views/core.py            |  6 +++---
 superset/views/dashboard/views.py |  2 +-
 4 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/superset/embedded/view.py b/superset/embedded/view.py
index e59a6ced90..462c6046fa 100644
--- a/superset/embedded/view.py
+++ b/superset/embedded/view.py
@@ -17,7 +17,7 @@
 import json
 from typing import Callable
 
-from flask import abort, g, request
+from flask import abort, request
 from flask_appbuilder import expose
 from flask_login import AnonymousUserMixin, login_user
 from flask_wtf.csrf import same_origin
@@ -78,7 +78,7 @@ class EmbeddedView(BaseSupersetView):
         )
 
         bootstrap_data = {
-            "common": common_bootstrap_payload(g.user),
+            "common": common_bootstrap_payload(),
             "embedded": {
                 "dashboard_id": embedded.dashboard_id,
             },
diff --git a/superset/views/base.py b/superset/views/base.py
index a0102bf3bb..c77a3e5c87 100644
--- a/superset/views/base.py
+++ b/superset/views/base.py
@@ -14,6 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+from __future__ import annotations
+
 import dataclasses
 import functools
 import logging
@@ -295,7 +297,7 @@ class BaseSupersetView(BaseView):
     def render_app_template(self) -> FlaskResponse:
         payload = {
             "user": bootstrap_user_data(g.user, include_perms=True),
-            "common": common_bootstrap_payload(g.user),
+            "common": common_bootstrap_payload(),
         }
         return self.render_template(
             "superset/spa.html",
@@ -383,7 +385,9 @@ def menu_data(user: User) -> dict[str, Any]:
 
 
 @cache_manager.cache.memoize(timeout=60)
-def cached_common_bootstrap_data(user: User, locale: str) -> dict[str, Any]:
+def cached_common_bootstrap_data(  # pylint: disable=unused-argument
+    user_id: int | None, locale: str
+) -> dict[str, Any]:
     """Common data always sent to the client
 
     The function is memoized as the return value only changes when user permissions
@@ -420,15 +424,15 @@ def cached_common_bootstrap_data(user: User, locale: str) -> dict[str, Any]:
         "extra_sequential_color_schemes": conf["EXTRA_SEQUENTIAL_COLOR_SCHEMES"],
         "extra_categorical_color_schemes": conf["EXTRA_CATEGORICAL_COLOR_SCHEMES"],
         "theme_overrides": conf["THEME_OVERRIDES"],
-        "menu_data": menu_data(user),
+        "menu_data": menu_data(g.user),
     }
     bootstrap_data.update(conf["COMMON_BOOTSTRAP_OVERRIDES_FUNC"](bootstrap_data))
     return bootstrap_data
 
 
-def common_bootstrap_payload(user: User) -> dict[str, Any]:
+def common_bootstrap_payload() -> dict[str, Any]:
     return {
-        **cached_common_bootstrap_data(user, get_locale()),
+        **cached_common_bootstrap_data(utils.get_user_id(), get_locale()),
         "flash_messages": get_flashed_messages(with_categories=True),
     }
 
@@ -538,7 +542,7 @@ def show_unexpected_exception(ex: Exception) -> FlaskResponse:
 def get_common_bootstrap_data() -> dict[str, Any]:
     def serialize_bootstrap_data() -> str:
         return json.dumps(
-            {"common": common_bootstrap_payload(g.user)},
+            {"common": common_bootstrap_payload()},
             default=utils.pessimistic_json_iso_dttm_ser,
         )
 
@@ -556,7 +560,7 @@ class SupersetModelView(ModelView):
     def render_app_template(self) -> FlaskResponse:
         payload = {
             "user": bootstrap_user_data(g.user, include_perms=True),
-            "common": common_bootstrap_payload(g.user),
+            "common": common_bootstrap_payload(),
         }
         return self.render_template(
             "superset/spa.html",
diff --git a/superset/views/core.py b/superset/views/core.py
index e39edb99af..22e09f9ff4 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -636,7 +636,7 @@ class Superset(BaseSupersetView):  # pylint: disable=too-many-public-methods
             "force": force,
             "user": bootstrap_user_data(g.user, include_perms=True),
             "forced_height": request.args.get("height"),
-            "common": common_bootstrap_payload(g.user),
+            "common": common_bootstrap_payload(),
         }
         if slc:
             title = slc.slice_name
@@ -896,7 +896,7 @@ class Superset(BaseSupersetView):  # pylint: disable=too-many-public-methods
             bootstrap_data=json.dumps(
                 {
                     "user": bootstrap_user_data(g.user, include_perms=True),
-                    "common": common_bootstrap_payload(g.user),
+                    "common": common_bootstrap_payload(),
                 },
                 default=utils.pessimistic_json_iso_dttm_ser,
             ),
@@ -990,7 +990,7 @@ class Superset(BaseSupersetView):  # pylint: disable=too-many-public-methods
 
         payload = {
             "user": bootstrap_user_data(g.user, include_perms=True),
-            "common": common_bootstrap_payload(g.user),
+            "common": common_bootstrap_payload(),
         }
 
         return self.render_template(
diff --git a/superset/views/dashboard/views.py b/superset/views/dashboard/views.py
index ba8b8b2fb3..e3a931105a 100644
--- a/superset/views/dashboard/views.py
+++ b/superset/views/dashboard/views.py
@@ -151,7 +151,7 @@ class Dashboard(BaseSupersetView):
         )
 
         bootstrap_data = {
-            "common": common_bootstrap_payload(g.user),
+            "common": common_bootstrap_payload(),
             "embedded": {"dashboard_id": dashboard_id_or_slug},
         }
 


(superset) 10/16: fix: alias column when fetching values (#26120)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 3edbb9fdbd468393f20defc3d7f67cab5292ae18
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Tue Nov 28 15:11:20 2023 -0500

    fix: alias column when fetching values (#26120)
    
    (cherry picked from commit 7223633da600fb3973834cb24d977f194a76f328)
---
 superset/models/helpers.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/superset/models/helpers.py b/superset/models/helpers.py
index 45d1b98406..13b4edb3bc 100644
--- a/superset/models/helpers.py
+++ b/superset/models/helpers.py
@@ -1343,7 +1343,13 @@ class ExploreMixin:  # pylint: disable=too-many-public-methods
         tbl, cte = self.get_from_clause(tp)
 
         qry = (
-            sa.select([target_col.get_sqla_col(template_processor=tp)])
+            sa.select(
+                # The alias (label) here is important because some dialects will
+                # automatically add a random alias to the projection because of the
+                # call to DISTINCT; others will uppercase the column names. This
+                # gives us a deterministic column name in the dataframe.
+                [target_col.get_sqla_col(template_processor=tp).label("column_values")]
+            )
             .select_from(tbl)
             .distinct()
         )
@@ -1359,7 +1365,7 @@ class ExploreMixin:  # pylint: disable=too-many-public-methods
             sql = self.mutate_query_from_config(sql)
 
             df = pd.read_sql_query(sql=sql, con=engine)
-            return df[denormalized_col_name].to_list()
+            return df["column_values"].to_list()
 
     def get_timestamp_expression(
         self,


(superset) 02/16: fix(security): restore default value of SESSION_COOKIE_SECURE to False (#26005)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 0c0bb50d4147ce056a84ce2133d8e653a0f0a4ef
Author: Sam Firke <sf...@users.noreply.github.com>
AuthorDate: Tue Nov 21 09:10:56 2023 -0500

    fix(security): restore default value of SESSION_COOKIE_SECURE to False (#26005)
    
    (cherry picked from commit bba7763825013689a4f4b4985b54d8802e61eef6)
---
 superset/config.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/superset/config.py b/superset/config.py
index e15c7bf990..164ea1a5be 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -1426,6 +1426,7 @@ TALISMAN_CONFIG = {
     },
     "content_security_policy_nonce_in": ["script-src"],
     "force_https": False,
+    "session_cookie_secure": False,
 }
 # React requires `eval` to work correctly in dev mode
 TALISMAN_DEV_CONFIG = {
@@ -1447,6 +1448,7 @@ TALISMAN_DEV_CONFIG = {
     },
     "content_security_policy_nonce_in": ["script-src"],
     "force_https": False,
+    "session_cookie_secure": False,
 }
 
 #


(superset) 16/16: fix(Alerts/Reports): allow use of ";" separator in slack recipient entry (#25894)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 0fda81d8115dd6f48e41d6de8eb9a1005b349f55
Author: Ross Mabbett <92...@users.noreply.github.com>
AuthorDate: Fri Dec 1 19:32:08 2023 -0500

    fix(Alerts/Reports): allow use of ";" separator in slack recipient entry (#25894)
    
    Co-authored-by: John Bodley <45...@users.noreply.github.com>
    (cherry picked from commit b7a9c220e14c6e85840568da4bf87be84b246749)
---
 superset/reports/notifications/slack.py            | 11 +++-
 .../reports/notifications/slack_tests.py           | 58 ++++++++++++++++++++++
 2 files changed, 68 insertions(+), 1 deletion(-)

diff --git a/superset/reports/notifications/slack.py b/superset/reports/notifications/slack.py
index 4c3f2ee419..c72a4f969f 100644
--- a/superset/reports/notifications/slack.py
+++ b/superset/reports/notifications/slack.py
@@ -43,6 +43,7 @@ from superset.reports.notifications.exceptions import (
     NotificationParamException,
     NotificationUnprocessableException,
 )
+from superset.utils.core import get_email_address_list
 from superset.utils.decorators import statsd_gauge
 
 logger = logging.getLogger(__name__)
@@ -59,7 +60,15 @@ class SlackNotification(BaseNotification):  # pylint: disable=too-few-public-met
     type = ReportRecipientType.SLACK
 
     def _get_channel(self) -> str:
-        return json.loads(self._recipient.recipient_config_json)["target"]
+        """
+        Get the recipient's channel(s).
+        Note Slack SDK uses "channel" to refer to one or more
+        channels. Multiple channels are demarcated by a comma.
+        :returns: The comma separated list of channel(s)
+        """
+        recipient_str = json.loads(self._recipient.recipient_config_json)["target"]
+
+        return ",".join(get_email_address_list(recipient_str))
 
     def _message_template(self, table: str = "") -> str:
         return __(
diff --git a/tests/unit_tests/reports/notifications/slack_tests.py b/tests/unit_tests/reports/notifications/slack_tests.py
new file mode 100644
index 0000000000..0a5e9baa46
--- /dev/null
+++ b/tests/unit_tests/reports/notifications/slack_tests.py
@@ -0,0 +1,58 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import pandas as pd
+
+
+def test_get_channel_with_multi_recipients() -> None:
+    """
+    Test the _get_channel function to ensure it will return a string
+    with recipients separated by commas without interstitial spacing
+    """
+    from superset.reports.models import ReportRecipients, ReportRecipientType
+    from superset.reports.notifications.base import NotificationContent
+    from superset.reports.notifications.slack import SlackNotification
+
+    content = NotificationContent(
+        name="test alert",
+        header_data={
+            "notification_format": "PNG",
+            "notification_type": "Alert",
+            "owners": [1],
+            "notification_source": None,
+            "chart_id": None,
+            "dashboard_id": None,
+        },
+        embedded_data=pd.DataFrame(
+            {
+                "A": [1, 2, 3],
+                "B": [4, 5, 6],
+                "C": ["111", "222", '<a href="http://www.example.com">333</a>'],
+            }
+        ),
+        description='<p>This is <a href="#">a test</a> alert</p><br />',
+    )
+    slack_notification = SlackNotification(
+        recipient=ReportRecipients(
+            type=ReportRecipientType.SLACK,
+            recipient_config_json='{"target": "some_channel; second_channel, third_channel"}',
+        ),
+        content=content,
+    )
+
+    result = slack_notification._get_channel()
+
+    assert result == "some_channel,second_channel,third_channel"


(superset) 12/16: fix: remove default secret key from helm (#23916)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit a5c842c876cd363f3f64b4ef6ae76db87ebca888
Author: Daniel Vaz Gaspar <da...@gmail.com>
AuthorDate: Wed Nov 29 15:48:39 2023 +0000

    fix: remove default secret key from helm (#23916)
    
    (cherry picked from commit 6a5a765689ef2d906784c055fe6007d1799eb33d)
---
 helm/superset/Chart.yaml             | 2 +-
 helm/superset/README.md              | 8 +++++++-
 helm/superset/README.md.gotmpl       | 6 ++++++
 helm/superset/templates/_helpers.tpl | 1 -
 helm/superset/values.yaml            | 2 ++
 5 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml
index 83f4119791..e03d905e0f 100644
--- a/helm/superset/Chart.yaml
+++ b/helm/superset/Chart.yaml
@@ -29,7 +29,7 @@ maintainers:
   - name: craig-rueda
     email: craig@craigrueda.com
     url: https://github.com/craig-rueda
-version: 0.10.15
+version: 0.11.0
 dependencies:
   - name: postgresql
     version: 12.1.6
diff --git a/helm/superset/README.md b/helm/superset/README.md
index b8d4385008..6510feb2e4 100644
--- a/helm/superset/README.md
+++ b/helm/superset/README.md
@@ -23,7 +23,7 @@ NOTE: This file is generated by helm-docs: https://github.com/norwoodj/helm-docs
 
 # superset
 
-![Version: 0.10.15](https://img.shields.io/badge/Version-0.10.15-informational?style=flat-square)
+![Version: 0.11.0](https://img.shields.io/badge/Version-0.11.0-informational?style=flat-square)
 
 Apache Superset is a modern, enterprise-ready business intelligence web application
 
@@ -40,6 +40,12 @@ helm repo add superset http://apache.github.io/superset/
 helm install my-superset superset/superset
 ```
 
+Make sure you set your own `SECRET_KEY` to something unique and secret. This secret key is used by Flask for
+securely signing the session cookie and will be used to encrypt sensitive data on Superset's metadata database.
+It should be a long random bytes or str.
+
+On helm this can be set on `extraSecretEnv.SUPERSET_SECRET_KEY` or `configOverrides.secrets`
+
 ## Requirements
 
 | Repository | Name | Version |
diff --git a/helm/superset/README.md.gotmpl b/helm/superset/README.md.gotmpl
index c17a7e31a7..facb955e31 100644
--- a/helm/superset/README.md.gotmpl
+++ b/helm/superset/README.md.gotmpl
@@ -39,6 +39,12 @@ helm repo add superset http://apache.github.io/superset/
 helm install my-superset superset/superset
 ```
 
+Make sure you set your own `SECRET_KEY` to something unique and secret. This secret key is used by Flask for
+securely signing the session cookie and will be used to encrypt sensitive data on Superset's metadata database.
+It should be a long random bytes or str.
+
+On helm this can be set on `extraSecretEnv.SUPERSET_SECRET_KEY` or `configOverrides.secrets`
+
 {{ template "chart.requirementsSection" . }}
 
 {{ template "chart.valuesSection" . }}
diff --git a/helm/superset/templates/_helpers.tpl b/helm/superset/templates/_helpers.tpl
index b450ec3ef0..02aff2dfc9 100644
--- a/helm/superset/templates/_helpers.tpl
+++ b/helm/superset/templates/_helpers.tpl
@@ -82,7 +82,6 @@ DATA_CACHE_CONFIG = CACHE_CONFIG
 
 SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg2://{env('DB_USER')}:{env('DB_PASS')}@{env('DB_HOST')}:{env('DB_PORT')}/{env('DB_NAME')}"
 SQLALCHEMY_TRACK_MODIFICATIONS = True
-SECRET_KEY = env('SECRET_KEY', 'thisISaSECRET_1234')
 
 class CeleryConfig(object):
   CELERY_IMPORTS = ('superset.sql_lab', )
diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml
index 7fe7e75412..8669056323 100644
--- a/helm/superset/values.yaml
+++ b/helm/superset/values.yaml
@@ -93,6 +93,8 @@ extraSecretEnv: {}
   # # Google API Keys: https://console.cloud.google.com/apis/credentials
   # GOOGLE_KEY: ...
   # GOOGLE_SECRET: ...
+  #   # Generate your own secret key for encryption. Use openssl rand -base64 42 to generate a good key
+  #  SUPERSET_SECRET_KEY: 'CHANGE_ME_TO_A_COMPLEX_RANDOM_SECRET'
 
 # -- Extra files to mount on `/app/pythonpath`
 extraConfigs: {}


(superset) 15/16: fix(database-import): Support importing a DB connection with a version set (#26116)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 0b040b4824b45d61fc34e8c38ab7d2a412832993
Author: Vitor Avila <96...@users.noreply.github.com>
AuthorDate: Fri Dec 1 18:20:27 2023 -0300

    fix(database-import): Support importing a DB connection with a version set (#26116)
    
    (cherry picked from commit c033ca959d391cca8f0e5a34e563ca4297ce2848)
---
 superset/databases/schemas.py                       |  1 +
 .../databases/commands/importers/v1/import_test.py  | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/superset/databases/schemas.py b/superset/databases/schemas.py
index 8dfb044beb..b7b44d6e4f 100644
--- a/superset/databases/schemas.py
+++ b/superset/databases/schemas.py
@@ -738,6 +738,7 @@ class ImportV1DatabaseExtraSchema(Schema):
     allows_virtual_table_explore = fields.Boolean(required=False)
     cancel_query_on_windows_unload = fields.Boolean(required=False)
     disable_data_preview = fields.Boolean(required=False)
+    version = fields.String(required=False, allow_none=True)
 
 
 class ImportV1DatabaseSchema(Schema):
diff --git a/tests/unit_tests/databases/commands/importers/v1/import_test.py b/tests/unit_tests/databases/commands/importers/v1/import_test.py
index b8bd24d94d..73e4cebea2 100644
--- a/tests/unit_tests/databases/commands/importers/v1/import_test.py
+++ b/tests/unit_tests/databases/commands/importers/v1/import_test.py
@@ -17,6 +17,7 @@
 # pylint: disable=unused-argument, import-outside-toplevel, invalid-name
 
 import copy
+import json
 
 import pytest
 from pytest_mock import MockFixture
@@ -142,3 +143,23 @@ def test_import_database_without_permission(
         str(excinfo.value)
         == "Database doesn't exist and user doesn't have permission to create databases"
     )
+
+
+def test_import_database_with_version(mocker: MockFixture, session: Session) -> None:
+    """
+    Test importing a database with a version set.
+    """
+    from superset import security_manager
+    from superset.commands.database.importers.v1.utils import import_database
+    from superset.models.core import Database
+    from tests.integration_tests.fixtures.importexport import database_config
+
+    mocker.patch.object(security_manager, "can_access", return_value=True)
+
+    engine = session.get_bind()
+    Database.metadata.create_all(engine)  # pylint: disable=no-member
+
+    config = copy.deepcopy(database_config)
+    config["extra"]["version"] = "1.1.1"
+    database = import_database(session, config)
+    assert json.loads(database.extra)["version"] == "1.1.1"


(superset) 08/16: fix: bump node-fetch to 2.6.7 (#26091)

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 00db4dfb06a17fb3a0bf895d85cd9ce35042a911
Author: Daniel Vaz Gaspar <da...@gmail.com>
AuthorDate: Mon Nov 27 09:23:52 2023 +0000

    fix: bump node-fetch to 2.6.7 (#26091)
    
    (cherry picked from commit 4fc2758e6a542382ee8e36bcc70dd57942038566)
---
 superset-frontend/package-lock.json | 2 +-
 superset-frontend/package.json      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json
index 9c1788e5b1..bf88514e63 100644
--- a/superset-frontend/package-lock.json
+++ b/superset-frontend/package-lock.json
@@ -257,7 +257,7 @@
         "less-loader": "^10.2.0",
         "mini-css-extract-plugin": "^2.3.0",
         "mock-socket": "^9.0.3",
-        "node-fetch": "^2.6.1",
+        "node-fetch": "^2.6.7",
         "prettier": "^2.4.1",
         "prettier-plugin-packagejson": "^2.2.15",
         "process": "^0.11.10",
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index 1e6d28b467..21f1df9877 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -322,7 +322,7 @@
     "less-loader": "^10.2.0",
     "mini-css-extract-plugin": "^2.3.0",
     "mock-socket": "^9.0.3",
-    "node-fetch": "^2.6.1",
+    "node-fetch": "^2.6.7",
     "prettier": "^2.4.1",
     "prettier-plugin-packagejson": "^2.2.15",
     "process": "^0.11.10",