Skip to content

Commit

Permalink
Merge branch 'master' into fix-athena-database-is-none
Browse files Browse the repository at this point in the history
  • Loading branch information
bossenti authored Nov 27, 2023
2 parents 1223c05 + a9650b6 commit 48f2f39
Show file tree
Hide file tree
Showing 82 changed files with 7,430 additions and 8,074 deletions.
11 changes: 10 additions & 1 deletion .github/actions/docker-custom-build-and-push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,20 @@ runs:
push: false
cache-from: type=registry,ref=${{ steps.docker_meta.outputs.tags }}
cache-to: type=inline
- name: Single Tag
if: ${{ inputs.publish != 'true' }}
shell: bash
run: |
TAGS="""
${{ steps.docker_meta.outputs.tags }}
"""
echo "SINGLE_TAG=$(echo $TAGS | tr '\n' ' ' | awk -F' ' '{ print $1 }')" >> $GITHUB_OUTPUT
id: single_tag
- name: Upload image locally for testing (if not publishing)
uses: ishworkh/docker-image-artifact-upload@v1
if: ${{ inputs.publish != 'true' }}
with:
image: ${{ steps.docker_meta.outputs.tags }}
image: ${{ steps.single_tag.outputs.SINGLE_TAG }}

# Code for building multi-platform images and pushing to Docker Hub.
- name: Set up QEMU
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker-unified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -876,11 +876,13 @@ jobs:
]
steps:
- uses: aws-actions/configure-aws-credentials@v1
if: ${{ needs.setup.outputs.publish != 'false' }}
with:
aws-access-key-id: ${{ secrets.AWS_SQS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SQS_ACCESS_KEY }}
aws-region: us-west-2
- uses: isbang/[email protected]
if: ${{ needs.setup.outputs.publish != 'false' }}
with:
sqs-url: ${{ secrets.DATAHUB_HEAD_SYNC_QUEUE }}
message: '{ "command": "git-sync", "args" : {"repoName": "${{ needs.setup.outputs.repository_name }}", "repoOrg": "${{ github.repository_owner }}", "repoBranch": "${{ needs.setup.outputs.branch_name }}", "repoShaShort": "${{ needs.setup.outputs.short_sha }}" }}'
38 changes: 21 additions & 17 deletions datahub-web-react/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'react-app',
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin
'plugin:jest/recommended',
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
'prettier',
'plugin:prettier/recommended',
],
plugins: ['@typescript-eslint'],
parserOptions: {
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
Expand All @@ -19,29 +18,34 @@ module.exports = {
project: './tsconfig.json',
},
rules: {
eqeqeq: ['error', 'always'],
'react/destructuring-assignment': 'off',
'no-console': 'off',
'no-debugger': 'warn',
'require-await': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'arrow-body-style': 'off',
'class-methods-use-this': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off', // TODO: remove this lint rule
'import/extensions': 'off',
'react/jsx-props-no-spreading': 'off',
'no-console': 'off',
'no-plusplus': 'off',
'no-prototype-builtins': 'off',
'react/require-default-props': 'off',
'no-restricted-exports': ['off', { restrictedNamedExports: ['default', 'then'] }],
'no-underscore-dangle': 'off',
'no-unsafe-optional-chaining': 'off',
'prefer-exponentiation-operator': 'off',
'prefer-regex-literals': 'off',
'react/destructuring-assignment': 'off',
'react/function-component-definition': 'off',
'react/jsx-no-bind': 'off',
'react/jsx-no-constructed-context-values': 'off',
'react/jsx-no-useless-fragment': 'off',
'react/jsx-props-no-spreading': 'off',
'react/no-unstable-nested-components': 'off',
'react/require-default-props': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-empty-interface': 'off',
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": 'off',
"import/no-extraneous-dependencies": 'off'
},
settings: {
react: {
Expand Down
2 changes: 1 addition & 1 deletion datahub-web-react/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ task yarnBuild(type: YarnTask, dependsOn: [yarnInstall, yarnTest, yarnLint]) {
}

task yarnQuickBuild(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
environment = [NODE_OPTIONS: "--max-old-space-size=3072"]
environment = [NODE_OPTIONS: "--max-old-space-size=3072 --openssl-legacy-provider"]
args = ['run', 'build']
}

Expand Down
40 changes: 31 additions & 9 deletions datahub-web-react/craco.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
/* eslint-disable @typescript-eslint/no-var-requires */
require('dotenv').config();
const { whenProd } = require('@craco/craco');
const CracoAntDesignPlugin = require('craco-antd');
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');

// eslint-disable-next-line import/no-dynamic-require
const themeConfig = require(`./src/conf/theme/${process.env.REACT_APP_THEME_CONFIG}`);

function addLessPrefixToKeys(styles) {
Expand All @@ -15,6 +18,23 @@ function addLessPrefixToKeys(styles) {

module.exports = {
webpack: {
configure: {
optimization: whenProd(() => ({
splitChunks: {
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all',
},
},
},
})),
// Webpack 5 no longer automatically pollyfill core Node.js modules
resolve: { fallback: { fs: false } },
// Ignore Webpack 5's missing source map warnings from node_modules
ignoreWarnings: [{ module: /node_modules/, message: /source-map-loader/ }],
},
plugins: {
add: [
// Self host images by copying them to the build directory
Expand All @@ -24,8 +44,8 @@ module.exports = {
// Copy monaco-editor files to the build directory
new CopyWebpackPlugin({
patterns: [
{ from: "node_modules/monaco-editor/min/vs/", to: "monaco-editor/vs" },
{ from: "node_modules/monaco-editor/min-maps/vs/", to: "monaco-editor/min-maps/vs" },
{ from: 'node_modules/monaco-editor/min/vs/', to: 'monaco-editor/vs' },
{ from: 'node_modules/monaco-editor/min-maps/vs/', to: 'monaco-editor/min-maps/vs' },
],
}),
],
Expand All @@ -41,13 +61,15 @@ module.exports = {
},
],
jest: {
configure: (jestConfig) => {
jestConfig.transformIgnorePatterns = [
// Ensures that lib0 and y-protocol libraries are transformed through babel as well
'node_modules/(?!(lib0|y-protocols)).+\\.(js|jsx|mjs|cjs|ts|tsx)$',
'^.+\\.module\\.(css|sass|scss)$',
];
return jestConfig;
configure: {
// Use dist files instead of source files
moduleNameMapper: {
'^d3-interpolate-path': `d3-interpolate-path/build/d3-interpolate-path`,
'^d3-(.*)$': `d3-$1/dist/d3-$1`,
'^lib0/((?!dist).*)$': 'lib0/dist/$1.cjs',
'^y-protocols/(.*)$': 'y-protocols/dist/$1.cjs',
'\\.(css|less)$': '<rootDir>/src/__mocks__/styleMock.js',
},
},
},
};
57 changes: 30 additions & 27 deletions datahub-web-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"@ant-design/colors": "^5.0.0",
"@ant-design/icons": "^4.3.0",
"@apollo/client": "^3.3.19",
"@craco/craco": "^6.1.1",
"@data-ui/xy-chart": "^0.0.84",
"@craco/craco": "^7.1.0",
"@graphql-codegen/fragment-matcher": "^5.0.0",
"@miragejs/graphql": "^0.1.11",
"@monaco-editor/react": "^4.3.1",
"@react-hook/window-size": "^3.0.7",
"@react-spring/web": "^9.7.3",
"@remirror/pm": "^2.0.3",
"@remirror/react": "^2.0.24",
"@remirror/styles": "^2.0.3",
Expand All @@ -30,21 +30,22 @@
"@types/react-router": "^5.1.8",
"@types/react-router-dom": "^5.1.6",
"@uiw/react-md-editor": "^3.3.4",
"@vx/axis": "^0.0.199",
"@vx/glyph": "^0.0.199",
"@vx/group": "^0.0.199",
"@vx/hierarchy": "^0.0.199",
"@vx/legend": "^0.0.199",
"@vx/scale": "^0.0.199",
"@vx/shape": "^0.0.199",
"@vx/tooltip": "^0.0.199",
"@vx/zoom": "^0.0.199",
"@visx/axis": "^3.1.0",
"@visx/curve": "^3.0.0",
"@visx/group": "^3.0.0",
"@visx/hierarchy": "^3.0.0",
"@visx/legend": "^3.2.0",
"@visx/scale": "^3.2.0",
"@visx/shape": "^3.2.0",
"@visx/xychart": "^3.2.0",
"@visx/zoom": "^3.1.1",
"analytics": "^0.8.9",
"antd": "4.24.7",
"color-hash": "^2.0.1",
"craco-antd": "^1.19.0",
"craco-antd": "^2.0.0",
"craco-babel-loader": "^1.0.4",
"cronstrue": "^1.122.0",
"d3-scale": "^3.3.0",
"d3-scale": "^4.0.2",
"dayjs": "^1.11.7",
"deepmerge": "^4.2.2",
"diff": "^5.0.0",
Expand All @@ -67,14 +68,13 @@
"react": "^17.0.0",
"react-color": "^2.19.3",
"react-dom": "^17.0.0",
"react-email-share-link": "^1.0.3",
"react-helmet-async": "^1.3.0",
"react-highlighter": "^0.4.3",
"react-icons": "4.3.1",
"react-js-cron": "^2.1.0",
"react-router": "^5.2.0",
"react-router-dom": "^5.1.6",
"react-scripts": "4.0.3",
"react-scripts": "^5.0.1",
"react-syntax-highlighter": "^15.4.4",
"react-visibility-sensor": "^5.1.1",
"reactour": "1.18.7",
Expand All @@ -83,7 +83,7 @@
"start-server-and-test": "1.12.2",
"styled-components": "^5.2.1",
"turndown-plugin-gfm": "^1.0.2",
"typescript": "^4.1.3",
"typescript": "^4.8.4",
"uuid": "^8.3.2",
"virtualizedtableforantd4": "^1.2.1",
"web-vitals": "^0.2.4",
Expand All @@ -95,7 +95,7 @@
"start:mock": "yarn run generate && BROWSER=none REACT_APP_MOCK=true craco start",
"start:e2e": "REACT_APP_MOCK=cy BROWSER=none PORT=3010 craco start",
"ec2-dev": "yarn run generate && CI=true;export CI;BROWSER=none craco start",
"build": "yarn run generate && NODE_OPTIONS=--openssl-legacy-provider CI=false REACT_APP_MOCK=false craco build && rm -rf dist/ && cp -r build/yarn/ dist/ && rm -r build/yarn/",
"build": "yarn run generate && NODE_OPTIONS='--max-old-space-size=3072 --openssl-legacy-provider' CI=false REACT_APP_MOCK=false craco build && rm -rf dist/ && cp -r build/yarn/ dist/ && rm -r build/yarn/",
"test": "craco test",
"pretest:e2e:ci": "yarn generate",
"test:e2e": "start-server-and-test start:e2e 3010",
Expand Down Expand Up @@ -123,24 +123,27 @@
]
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@graphql-codegen/cli": "1.20.0",
"@graphql-codegen/near-operation-file-preset": "^1.17.13",
"@graphql-codegen/typescript-operations": "1.17.13",
"@graphql-codegen/typescript-react-apollo": "2.2.1",
"@types/graphql": "^14.5.0",
"@types/query-string": "^6.3.0",
"@types/styled-components": "^5.1.7",
"@typescript-eslint/eslint-plugin": "^4.25.0",
"@typescript-eslint/parser": "^4.25.0",
"babel-loader": "8.2.2",
"copy-webpack-plugin": "6.4.1",
"eslint": "^7.27.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.23.2",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"copy-webpack-plugin": "^11.0.0",
"eslint": "^8.2.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"http-proxy-middleware": "2.0.0",
"prettier": "^2.3.0",
"prettier": "^2.8.8",
"source-map-explorer": "^2.5.2"
},
"resolutions": {
Expand Down
1 change: 1 addition & 0 deletions datahub-web-react/src/__mocks__/styleMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useMemo } from 'react';
import { BarStack } from '@vx/shape';
import { scaleOrdinal, scaleLinear, scaleBand } from '@vx/scale';
import { Group } from '@vx/group';
import { AxisBottom, AxisRight } from '@vx/axis';
import { BarStack } from '@visx/shape';
import { scaleOrdinal, scaleLinear, scaleBand } from '@visx/scale';
import { Group } from '@visx/group';
import { AxisBottom, AxisRight } from '@visx/axis';

import { BarChart as BarChartType } from '../../../types.generated';
import { lineColors } from './lineColors';
Expand Down Expand Up @@ -85,7 +85,7 @@ export const BarChart = ({ chartData, width, height }: Props) => {
<svg width={width + WIDTH_MARGIN_SIZE} height={height}>
<rect x={0} y={0} width={width} height={height} fill="white" rx={14} />
<Group top={HEIGHT_MARGIN_SIZE} left={WIDTH_MARGIN_SIZE}>
<BarStack<typeof transformedChartData[0], typeof keys[number]>
<BarStack<(typeof transformedChartData)[0], (typeof keys)[number]>
data={transformedChartData}
keys={keys}
x={(data) => data.displayName}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Col, Row } from 'antd';
import { LegendOrdinal, LegendItem, LegendLabel } from '@vx/legend';
import { LegendOrdinal, LegendItem, LegendLabel } from '@visx/legend';
import { ScaleOrdinal } from 'd3-scale/src/ordinal';
import styled from 'styled-components';

Expand Down
Loading

0 comments on commit 48f2f39

Please sign in to comment.