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/27 20:44:19 UTC

(superset) 02/08: chore: Removes Chromatic workflow and dependencies (#27232)

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 51f359113919220871e86a9d5ddd520964f6a9ce
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Fri Feb 23 13:31:58 2024 -0500

    chore: Removes Chromatic workflow and dependencies (#27232)
---
 .github/workflows/chromatic-master.yml             | 72 ----------------------
 superset-frontend/package-lock.json                | 30 +--------
 superset-frontend/package.json                     |  3 -
 .../shared/components/createQueryStory.tsx         |  3 -
 .../superset-ui-connection/ConnectionStories.tsx   |  6 +-
 5 files changed, 3 insertions(+), 111 deletions(-)

diff --git a/.github/workflows/chromatic-master.yml b/.github/workflows/chromatic-master.yml
deleted file mode 100644
index efdbfec2f6..0000000000
--- a/.github/workflows/chromatic-master.yml
+++ /dev/null
@@ -1,72 +0,0 @@
-# .github/workflows/chromatic.yml
-# see https://www.chromatic.com/docs/github-actions
-#
-# 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.
-#
-
-# Workflow name
-name: 'Chromatic Storybook Master'
-
-# Event for the workflow
-# Only run if changes were made in superset-frontend folder of repo on merge to Master
-on:
-  # This will trigger when a branch merges to master when the PR has changes in the frontend folder updating the chromatic baseline
-  push:
-    branches:
-      - master
-    paths:
-      - "superset-frontend/**"
-
-# List of jobs
-jobs:
-  config:
-    runs-on: "ubuntu-latest"
-    outputs:
-      has-secrets: ${{ steps.check.outputs.has-secrets }}
-    steps:
-      - name: "Check for secrets"
-        id: check
-        shell: bash
-        run: |
-          if [ -n "${{ (secrets.CHROMATIC_PROJECT_TOKEN != '') || '' }}" ]; then
-            echo "has-secrets=1" >> "$GITHUB_OUTPUT"
-          fi
-
-  chromatic-deployment:
-    needs: config
-    if: needs.config.outputs.has-secrets
-    # Operating System
-    runs-on: ubuntu-latest
-    # Job steps
-    steps:
-      - uses: actions/checkout@v3
-        with:
-          fetch-depth: 0 # 👈 Required to retrieve git history
-      - name: Install dependencies
-        run: npm ci
-        working-directory: superset-frontend
-      # 👇 Build and publish Storybook to Chromatic
-      - name: Build and publish Storybook to Chromatic
-        id: chromatic-master
-        uses: chromaui/action@v1
-        # Required options for the Chromatic GitHub Action
-        with:
-          # 👇 Location of package.json from root of mono-repo
-          workingDir: superset-frontend
-          # 👇 Chromatic projectToken, refer to the manage page to obtain it.
-          projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
-          exitZeroOnChanges: true # 👈 Option to prevent the workflow from failing
-          autoAcceptChanges: true # 👈 Option to accept all changes when merging to master
diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json
index 8b371df962..0a4ed84d6c 100644
--- a/superset-frontend/package-lock.json
+++ b/superset-frontend/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "superset",
-  "version": "3.1.0",
+  "version": "3.1.1",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "superset",
-      "version": "3.1.0",
+      "version": "3.1.1",
       "license": "Apache-2.0",
       "workspaces": [
         "packages/*",
@@ -221,7 +221,6 @@
         "babel-plugin-dynamic-import-node": "^2.3.3",
         "babel-plugin-jsx-remove-data-test-id": "^2.1.3",
         "babel-plugin-lodash": "^3.3.4",
-        "chromatic": "^6.7.4",
         "copy-webpack-plugin": "^9.1.0",
         "cross-env": "^5.2.1",
         "css-loader": "^6.8.1",
@@ -25322,21 +25321,6 @@
       "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
       "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
     },
-    "node_modules/chromatic": {
-      "version": "6.7.4",
-      "resolved": "https://registry.npmjs.org/chromatic/-/chromatic-6.7.4.tgz",
-      "integrity": "sha512-QW4i8RQsON0JVnFnRf+8y70aIJptvC0Oi/26YJ669Dl03WmJRpobNO5qWFPTiv3KFKMc1Qf6/qFsRVZCtn+bfA==",
-      "dev": true,
-      "dependencies": {
-        "@discoveryjs/json-ext": "^0.5.7",
-        "@types/webpack-env": "^1.17.0"
-      },
-      "bin": {
-        "chroma": "bin/main.cjs",
-        "chromatic": "bin/main.cjs",
-        "chromatic-cli": "bin/main.cjs"
-      }
-    },
     "node_modules/chrome-trace-event": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz",
@@ -84097,16 +84081,6 @@
       "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
       "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
     },
-    "chromatic": {
-      "version": "6.7.4",
-      "resolved": "https://registry.npmjs.org/chromatic/-/chromatic-6.7.4.tgz",
-      "integrity": "sha512-QW4i8RQsON0JVnFnRf+8y70aIJptvC0Oi/26YJ669Dl03WmJRpobNO5qWFPTiv3KFKMc1Qf6/qFsRVZCtn+bfA==",
-      "dev": true,
-      "requires": {
-        "@discoveryjs/json-ext": "^0.5.7",
-        "@types/webpack-env": "^1.17.0"
-      }
-    },
     "chrome-trace-event": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz",
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index a43f110abc..5d7c711bbe 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -44,7 +44,6 @@
     "build-instrumented": "cross-env NODE_ENV=production BABEL_ENV=instrumented webpack --mode=production --color",
     "build-storybook": "build-storybook",
     "check-translation": "prettier --check ../superset/translations/**/LC_MESSAGES/*.json",
-    "chromatic": "npx chromatic --skip 'dependabot/**'  --only-changed",
     "clean-translation": "prettier --write ../superset/translations/**/LC_MESSAGES/*.json",
     "core:cover": "cross-env NODE_ENV=test jest --coverage --coverageThreshold='{\"global\":{\"statements\":100,\"branches\":100,\"functions\":100,\"lines\":100}}' --collectCoverageFrom='[\"packages/**/src/**/*.{js,ts}\", \"!packages/superset-ui-demo/**/*\"]' packages",
     "cover": "cross-env NODE_ENV=test jest --coverage",
@@ -56,7 +55,6 @@
     "plugins:build": "node ./scripts/build.js",
     "plugins:build-assets": "node ./scripts/copyAssets.js",
     "plugins:build-storybook": "cd packages/superset-ui-demo && npm run build-storybook",
-    "plugins:chromatic": "cd packages/superset-ui-demo && npm run chromatic",
     "plugins:create-conventional-version": "npm run prune && lerna version --conventional-commits --create-release github --no-private --yes",
     "plugins:create-minor-version": "npm run prune && lerna version minor --no-private --yes",
     "plugins:create-patch-version": "npm run prune && lerna version patch --no-private --yes",
@@ -286,7 +284,6 @@
     "babel-plugin-dynamic-import-node": "^2.3.3",
     "babel-plugin-jsx-remove-data-test-id": "^2.1.3",
     "babel-plugin-lodash": "^3.3.4",
-    "chromatic": "^6.7.4",
     "copy-webpack-plugin": "^9.1.0",
     "cross-env": "^5.2.1",
     "css-loader": "^6.8.1",
diff --git a/superset-frontend/packages/superset-ui-demo/storybook/shared/components/createQueryStory.tsx b/superset-frontend/packages/superset-ui-demo/storybook/shared/components/createQueryStory.tsx
index eb1d39e41a..d6396d1320 100644
--- a/superset-frontend/packages/superset-ui-demo/storybook/shared/components/createQueryStory.tsx
+++ b/superset-frontend/packages/superset-ui-demo/storybook/shared/components/createQueryStory.tsx
@@ -96,8 +96,5 @@ export default function createQueryStory({
       </div>
     );
   };
-  story.parameters = {
-    chromatic: { disable: true },
-  };
   return story;
 }
diff --git a/superset-frontend/packages/superset-ui-demo/storybook/stories/superset-ui-connection/ConnectionStories.tsx b/superset-frontend/packages/superset-ui-demo/storybook/stories/superset-ui-connection/ConnectionStories.tsx
index 3f75837e91..4a31d8de35 100644
--- a/superset-frontend/packages/superset-ui-demo/storybook/stories/superset-ui-connection/ConnectionStories.tsx
+++ b/superset-frontend/packages/superset-ui-demo/storybook/stories/superset-ui-connection/ConnectionStories.tsx
@@ -41,7 +41,7 @@ export default {
   ],
 };
 
-export const configureCORS = () => {
+export const ConfigureCORS = () => {
   const host = text('Superset App host for CORS request', 'localhost:8088');
   const selectEndpoint = select('Endpoint', ENDPOINTS, '');
   const customEndpoint = text('Custom Endpoint (override above)', '');
@@ -80,7 +80,3 @@ export const configureCORS = () => {
     </div>
   );
 };
-
-configureCORS.parameters = {
-  chromatic: { disable: true },
-};