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 2024/02/22 17:50:55 UTC

(superset) branch 3.1 updated (5ac4d830f0 -> dea2f258d6)

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

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


 discard 5ac4d830f0 fix: Failed to execute importScripts on worker-css (#27191)
     new dea2f258d6 fix: Failed to execute importScripts on worker-css (#27191)

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (5ac4d830f0)
            \
             N -- N -- N   refs/heads/3.1 (dea2f258d6)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 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:
 superset/views/core.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


(superset) 01/01: fix: Failed to execute importScripts on worker-css (#27191)

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

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

commit dea2f258d66fca6c7c7901b572a9245f23591161
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Wed Feb 21 13:01:26 2024 -0500

    fix: Failed to execute importScripts on worker-css (#27191)
    
    (cherry picked from commit 983a1646c439116d0f65b7f2e9907ebb5046d672)
---
 .../src/components/AsyncAceEditor/index.tsx           |  4 ++++
 superset-frontend/src/types/ace-builds.ts             | 19 +++++++++++++++++++
 superset-frontend/webpack.config.js                   |  4 ++++
 superset/views/core.py                                |  5 +++--
 4 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/superset-frontend/src/components/AsyncAceEditor/index.tsx b/superset-frontend/src/components/AsyncAceEditor/index.tsx
index 2e499e150b..1b755f50ef 100644
--- a/superset-frontend/src/components/AsyncAceEditor/index.tsx
+++ b/superset-frontend/src/components/AsyncAceEditor/index.tsx
@@ -24,11 +24,15 @@ import {
   TextMode as OrigTextMode,
 } from 'brace';
 import AceEditor, { IAceEditorProps } from 'react-ace';
+import { config } from 'ace-builds';
 import { acequire } from 'ace-builds/src-noconflict/ace';
 import AsyncEsmComponent, {
   PlaceholderProps,
 } from 'src/components/AsyncEsmComponent';
 import useEffectEvent from 'src/hooks/useEffectEvent';
+import cssWorkerUrl from 'ace-builds/src-noconflict/worker-css';
+
+config.setModuleUrl('ace/mode/css_worker', cssWorkerUrl);
 
 export interface AceCompleterKeywordData {
   name: string;
diff --git a/superset-frontend/src/types/ace-builds.ts b/superset-frontend/src/types/ace-builds.ts
new file mode 100644
index 0000000000..0c34a85403
--- /dev/null
+++ b/superset-frontend/src/types/ace-builds.ts
@@ -0,0 +1,19 @@
+/**
+ * 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.
+ */
+declare module 'ace-builds/src-noconflict/worker-css';
diff --git a/superset-frontend/webpack.config.js b/superset-frontend/webpack.config.js
index dea99be2cf..2fa922873e 100644
--- a/superset-frontend/webpack.config.js
+++ b/superset-frontend/webpack.config.js
@@ -346,6 +346,10 @@ const config = {
         ],
         use: [babelLoader],
       },
+      {
+        test: /ace-builds.*\/worker-.*$/,
+        type: 'asset/resource',
+      },
       // react-hot-loader use "ProxyFacade", which is a wrapper for react Component
       // see https://github.com/gaearon/react-hot-loader/issues/1311
       // TODO: refactor recurseReactClone
diff --git a/superset/views/core.py b/superset/views/core.py
index 3e895e6b4b..3541154a26 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -14,7 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-# pylint: disable=invalid-name
+# pylint: disable=invalid-name,too-many-lines
+#
 from __future__ import annotations
 
 import contextlib
@@ -46,8 +47,8 @@ from superset import (
 from superset.async_events.async_query_manager import AsyncQueryTokenException
 from superset.commands.chart.exceptions import ChartNotFoundError
 from superset.commands.chart.warm_up_cache import ChartWarmUpCacheCommand
-from superset.commands.dashboard.importers.v0 import ImportDashboardsCommand
 from superset.commands.dashboard.exceptions import DashboardAccessDeniedError
+from superset.commands.dashboard.importers.v0 import ImportDashboardsCommand
 from superset.commands.dashboard.permalink.get import GetDashboardPermalinkCommand
 from superset.commands.dataset.exceptions import DatasetNotFoundError
 from superset.commands.explore.form_data.create import CreateFormDataCommand