Skip to content

Commit

Permalink
Remove the deprecation warning message in the dashboard pod (#1119)
Browse files Browse the repository at this point in the history
* fix: deprecation warning message in the dashboard pod

Signed-off-by: Oleksii Kurinnyi <[email protected]>

* fixup! fix: deprecation warning message in the dashboard pod

---------

Signed-off-by: Oleksii Kurinnyi <[email protected]>
  • Loading branch information
akurinnoy authored May 30, 2024
1 parent 9873276 commit c89f94e
Show file tree
Hide file tree
Showing 12 changed files with 175 additions and 283 deletions.
117 changes: 103 additions & 14 deletions .deps/dev.md

Large diffs are not rendered by default.

229 changes: 0 additions & 229 deletions .deps/prod.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions build/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,20 @@ RUN yarn install --network-timeout 3600000
COPY packages/ /dashboard/packages
RUN yarn build

# leave only production dependencies
RUN yarn workspace @eclipse-che/dashboard-backend install --production

FROM docker.io/node:18.19.1-alpine3.19

RUN apk --no-cache add curl

ENV FRONTEND_LIB=/dashboard/packages/dashboard-frontend/lib/public
ENV BACKEND_LIB=/dashboard/packages/dashboard-backend/lib
ENV BACKEND_NODE_MODULES=/dashboard/packages/dashboard-backend/node_modules/
ENV DEVFILE_REGISTRY=/dashboard/packages/devfile-registry

COPY --from=builder ${BACKEND_LIB} /backend
COPY --from=builder ${BACKEND_NODE_MODULES} /backend/node_modules
COPY --from=builder ${FRONTEND_LIB} /public
COPY --from=builder ${DEVFILE_REGISTRY} /public/dashboard/devfile-registry

Expand Down
3 changes: 3 additions & 0 deletions build/dockerfiles/brew.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ RUN ln -s "$REMOTE_SOURCES_DIR"/devspaces-images-dashboard/app/devspaces-dashboa
# cachito:yarn step 5: the actual build!
# hadolint ignore=DL3059
RUN yarn build
RUN yarn workspace @eclipse-che/dashboard-backend install --production

# cachito:yarn step 6: cleanup (required only if not using a builder stage)
# RUN rm -rf $REMOTE_SOURCES_DIR
Expand All @@ -54,9 +55,11 @@ RUN \

ENV FRONTEND_LIB=$REMOTE_SOURCES_DIR/devspaces-images-dashboard/app/devspaces-dashboard/packages/dashboard-frontend/lib/public
ENV BACKEND_LIB=$REMOTE_SOURCES_DIR/devspaces-images-dashboard/app/devspaces-dashboard/packages/dashboard-backend/lib
ENV BACKEND_NODE_MODULES=$REMOTE_SOURCES_DIR/devspaces-images-dashboard/app/devspaces-dashboard/packages/dashboard-backend/node_modules/
ENV DEVFILE_REGISTRY=$REMOTE_SOURCES_DIR/devspaces-images-dashboard/app/devspaces-dashboard/packages/devfile-registry

COPY --from=builder ${BACKEND_LIB} /backend
COPY --from=builder ${BACKEND_NODE_MODULES} /backend/node_modules
COPY --from=builder ${FRONTEND_LIB} /public
COPY --from=builder ${DEVFILE_REGISTRY} /public/dashboard/devfile-registry

Expand Down
3 changes: 3 additions & 0 deletions build/dockerfiles/rhel.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ COPY . /dashboard/
WORKDIR /dashboard/
RUN npm i -g yarn; yarn install
RUN yarn build
RUN yarn workspace @eclipse-che/dashboard-backend install --production

# https://registry.access.redhat.com/ubi8/nodejs-18
FROM registry.access.redhat.com/ubi8/nodejs-18:1-110
Expand All @@ -31,9 +32,11 @@ RUN \

ENV FRONTEND_LIB=/dashboard/packages/dashboard-frontend/lib/public
ENV BACKEND_LIB=/dashboard/packages/dashboard-backend/lib
ENV BACKEND_NODE_MODULES=/dashboard/packages/dashboard-backend/node_modules/
ENV DEVFILE_REGISTRY=/dashboard/packages/devfile-registry

COPY --from=builder ${BACKEND_LIB} /backend
COPY --from=builder ${BACKEND_NODE_MODULES} /backend/node_modules
COPY --from=builder ${FRONTEND_LIB} /public
COPY --from=builder ${DEVFILE_REGISTRY} /public/dashboard/devfile-registry

Expand Down
2 changes: 2 additions & 0 deletions build/dockerfiles/skaffold.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ FROM docker.io/node:18.19.1-alpine3.19

ENV FRONTEND_LIB=../../packages/dashboard-frontend/lib/public
ENV BACKEND_LIB=../../packages/dashboard-backend/lib
ENV BACKEND_NODE_MODULES=../../packages/dashboard-backend/node_modules
ENV DEVFILE_REGISTRY=../../packages/devfile-registry

COPY ${BACKEND_LIB} /backend
COPY ${BACKEND_NODE_MODULES} /backend/node_modules
COPY ${FRONTEND_LIB} /public
COPY ${DEVFILE_REGISTRY} /public/dashboard/devfile-registry

Expand Down
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
"version": "7.87.0-next",
"description": "Dashboard for Eclipse Che",
"private": true,
"workspaces": [
"packages/*"
],
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/dashboard-backend/**"
]
},
"bugs": {
"url": "https://github.com/eclipse/che/issues"
},
Expand Down
6 changes: 4 additions & 2 deletions packages/dashboard-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
],
"license": "EPL-2.0",
"dependencies": {
"@devfile/api": "2.2.2-1715367693",
"@eclipse-che/che-devworkspace-generator": "7.87.0-next-68df316",
"@eclipse-che/common": "file:../common",
"@fastify/cors": "^9.0.1",
"@fastify/error": "^3.4.1",
"@fastify/http-proxy": "^9.5.0",
Expand All @@ -50,7 +52,6 @@
"ws": "^8.17.0"
},
"devDependencies": {
"@devfile/api": "2.2.2-1715367693",
"@types/args": "^5.0.0",
"@types/fs-extra": "^11.0.1",
"@types/jest": "^29.5.3",
Expand Down Expand Up @@ -79,7 +80,8 @@
"webpack": "^5.91.0",
"webpack-bundle-analyzer": "^4.10.0",
"webpack-cli": "^5.1.4",
"webpack-merge": "^5.9.0"
"webpack-merge": "^5.9.0",
"webpack-node-externals": "^3.0.0"
},
"repository": {
"type": "git",
Expand Down
38 changes: 9 additions & 29 deletions packages/dashboard-backend/webpack.config.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

const path = require('path');
const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
const nodeExternals = require('webpack-node-externals');

module.exports = () => {
return {
Expand Down Expand Up @@ -44,42 +44,22 @@ module.exports = () => {
alias: {
// alias for absolute imports (see tsconfig.json)
'@': path.resolve(__dirname, 'src/'),

// not everything we need is exported from the package
// so we need to alias the rest
'@devfile/api/api': path.resolve(__dirname, '../../node_modules/@devfile/api/api.ts'),
},
},
resolveLoader: {},
plugins: [
new webpack.ProgressPlugin(),
new CopyPlugin({
patterns: [
{
from: path.resolve(
'..',
'..',
'node_modules',
'@fastify/swagger-ui',
'static',
'logo.svg',
),
to: 'server/static',
},
],
}),
new CopyPlugin({
patterns: [
{
from: path.resolve('..', '..', 'node_modules', '@fastify/swagger-ui', 'static'),
to: 'static',
},
],
}),
],
plugins: [new webpack.ProgressPlugin()],
node: {
__dirname: false,
},
target: 'node',
externalsPresets: { node: true },
externals: [
nodeExternals({
allowlist: [/^@devfile\/api/],
}),
],
};
};
2 changes: 1 addition & 1 deletion packages/dashboard-frontend/webpack.config.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const config = {
if (pathData.chunk.name === 'service-worker') {
return '[name].js';
}
return '[name].[hash].js';
return '[name].[fullhash:8].js';
},
chunkFilename: '[name].[chunkhash].js',
globalObject: 'this',
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard-frontend/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const config = {
},
plugins: [
new MiniCssExtractPlugin({
filename: '[name].[hash].css',
filename: '[name].[fullhash:8].css',
}),
new webpack.DefinePlugin({
__isBrowser__: 'true',
Expand Down
40 changes: 36 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@
jsonschema "^1.4.1"
reflect-metadata "^0.1.13"

"@eclipse-che/common@file:packages/common":
version "7.87.0-next"

"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
Expand Down Expand Up @@ -10433,7 +10436,16 @@ string-length@^4.0.1:
char-regex "^1.0.2"
strip-ansi "^6.0.0"

"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -10507,7 +10519,14 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -11465,6 +11484,11 @@ webpack-merge@^5.7.3, webpack-merge@^5.9.0:
flat "^5.0.2"
wildcard "^2.0.0"

webpack-node-externals@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-3.0.0.tgz#1a3407c158d547a9feb4229a9e3385b7b60c9917"
integrity sha512-LnL6Z3GGDPht/AigwRh2dvL9PQPFQ8skEpVrWZXLWBYmqcaojHNN0onvHzie6rq7EWKrrBfPYqNEzTJgiwEQDQ==

webpack-sources@^1.0.1:
version "1.4.3"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933"
Expand Down Expand Up @@ -11654,8 +11678,7 @@ wordwrap@^1.0.0:
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
name wrap-ansi-cjs
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -11673,6 +11696,15 @@ wrap-ansi@^6.0.1:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit c89f94e

Please sign in to comment.