Bug 2020001

Summary: Update dockerfile for demo dynamic plugin to reflect dir change
Product: OpenShift Container Platform Reporter: Joe Caiani <jcaiani>
Component: Management ConsoleAssignee: Joe Caiani <jcaiani>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.10CC: aos-bugs, jhadvig, yapei
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:24:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Caiani 2021-11-03 19:52:43 UTC
Description of problem:

Update dockerfile for demo dynamic plugin to reflect dir change

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. docker build -f Dockerfile.plugins.demo -t quay.io/$USER/console-demo-plugin .
2. 
3.

Actual results:
build fails

Expected results:


Additional info:

Comment 1 Jakub Hadvig 2021-11-04 08:40:55 UTC
*** Bug 2020041 has been marked as a duplicate of this bug. ***

Comment 3 Yadan Pei 2021-11-08 06:38:35 UTC
1. pull latest console code
2. build dynamic plugin image with command `docker build -f Dockerfile.plugins.demo -t quay.io/$USER/console-demo-plugin .`

[root@preserved-qe-ui-rhel-1 console]# docker build -f Dockerfile.plugins.demo -t quay.io/yapei/console-demo-plugin:410 .
Sending build context to Docker daemon  896.4MB
Step 1/15 : FROM quay.io/coreos/tectonic-console-builder:v23 AS build
 ---> 74bca84fd98d
Step 2/15 : RUN mkdir -p /src/console
 ---> Running in 568ecd7497d1
Removing intermediate container 568ecd7497d1
 ---> d5b453840b8b
Step 3/15 : COPY . /src/console
 ---> bfcdf72c3af9
Step 4/15 : WORKDIR /src/console/frontend
 ---> Running in 5924dd9a1e6f
Removing intermediate container 5924dd9a1e6f
 ---> 42f08cabe0f4
Step 5/15 : RUN yarn install
 ---> Running in f1e7d75f25c5
yarn install v1.22.15
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "minimist.5" is incompatible with requested version "minimist.8"
warning Resolution field "minimist.5" is incompatible with requested version "minimist@~0.0.1"
[3/5] Fetching packages...
warning Pattern ["asn1js@latest"] is trying to unpack in the same destination "/usr/local/share/.cache/yarn/v6/npm-asn1js-2.0.26-0a6d435000f556a96c6012969d9704d981b71251-integrity/node_modules/asn1js" as pattern ["asn1js@^2.0.26"]. This could result in non-deterministic behavior, skipping.
warning monaco-languageclient.0: The engine "vscode" appears to be invalid.
warning vscode-languageclient.3: The engine "vscode" appears to be invalid.
info fsevents.3: The platform "linux" is incompatible with this module.
info "fsevents.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents.2: The platform "linux" is incompatible with this module.
info "fsevents.2" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents.13: The platform "linux" is incompatible with this module.
info "fsevents.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents.3: The platform "linux" is incompatible with this module.
info "fsevents.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents.4: The platform "linux" is incompatible with this module.
info "fsevents.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "@patternfly/react-topology > mobx-react.5" has incorrect peer dependency "react@^16.8.0 || 16.9.0-alpha.0".
warning "@patternfly/react-topology > mobx-react > mobx-react-lite.7" has incorrect peer dependency "react@^16.8.0".
warning "@patternfly/react-virtualized-extension > react-virtualized.1" has incorrect peer dependency "react@^15.3.0 || ^16.0.0-alpha".
warning "@patternfly/react-virtualized-extension > react-virtualized.1" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".
warning " > focus-trap-react.0" has incorrect peer dependency "react.x || ^15.0.0 || ^16.0.0".
warning " > focus-trap-react.0" has incorrect peer dependency "react-dom.x || ^15.0.0 || ^16.0.0".
warning " > formik.3" has incorrect peer dependency "react@^16.8.0".
warning " > react-copy-to-clipboard.1" has incorrect peer dependency "react@^15.3.0 || ^16.0.0".
warning " > react-monaco-editor.2" has incorrect peer dependency "@types/react@^17.x".
warning " > react-tagsinput.0" has incorrect peer dependency "react@^16.0.0 || ^15.0.0 || ^0.14.0".
warning " > react-virtualized.3" has incorrect peer dependency "react@^15.3.0 || ^16.0.0-alpha".
warning " > react-virtualized.3" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".
warning " > @cypress/webpack-preprocessor.0" has unmet peer dependency "@babel/preset-env@^7.0.0".
warning "@graphql-codegen/typescript > @graphql-codegen/visitor-plugin-common > @graphql-tools/relay-operation-optimizer > relay-compiler.0" has incorrect peer dependency "graphql@^15.0.0".
warning " > @testing-library/user-event.9" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning "@wojtekmaj/enzyme-adapter-react-17 > enzyme-adapter-utils.0" has incorrect peer dependency "react.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0".
warning "@wojtekmaj/enzyme-adapter-react-17 > enzyme-adapter-utils > airbnb-prop-types.0" has incorrect peer dependency "react@^0.14 || ^15.0.0 || ^16.0.0-alpha".
warning " > cypress-axe.0" has unmet peer dependency "axe-core@^3 || ^4".
warning " > cypress-axe.0" has incorrect peer dependency "cypress@^3 || ^4 || ^5 || ^6".
warning " > cypress-multi-reporters.0" has unmet peer dependency "mocha@>=3.1.2".
warning " > eslint-plugin-cypress.1" has unmet peer dependency "eslint@>= 3.2.1".
warning " > eslint-plugin-import.1" has unmet peer dependency "eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0".
warning " > mocha-junit-reporter.3" has unmet peer dependency "mocha@>=2.2.5".
warning " > mochawesome.1" has unmet peer dependency "mocha@>=7".
warning " > monaco-editor-webpack-plugin.0" has unmet peer dependency "monaco-editor.x || 0.20.x".
warning " > ts-jest.4" has incorrect peer dependency "typescript".
warning "workspace-aggregator-d47a5ea8-da38-4996-95e8-83b5928031cc > eslint-plugin-console > eslint-config-airbnb.1" has incorrect peer dependency "eslint-plugin-react-hooks@^1.7.0".
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.




[5/5] Building fresh packages...
$ yarn generate
yarn run v1.22.15
$ yarn generate-graphql && yarn build-plugin-sdk
$ graphql-codegen --config graphql-codegen.yml
[03:17:12] Parse configuration [started]
[03:17:12] Parse configuration [completed]
[03:17:12] Generate outputs [started]
[03:17:12] Generate @types/console/generated/graphql-schema.ts [started]
[03:17:12] Generate @types/console/generated/graphql-queries.d.ts [started]
[03:17:12] Load GraphQL schemas [started]
[03:17:12] Load GraphQL schemas [started]
[03:17:12] Load GraphQL schemas [completed]
[03:17:12] Load GraphQL documents [started]
[03:17:12] Load GraphQL schemas [completed]
[03:17:12] Load GraphQL documents [started]
[03:17:18] Load GraphQL documents [completed]
[03:17:18] Generate [started]
[03:17:18] Generate [completed]
[03:17:18] Generate @types/console/generated/graphql-queries.d.ts [completed]
[03:17:18] Load GraphQL documents [completed]
[03:17:18] Generate [started]
[03:17:18] Generate [completed]
[03:17:18] Generate @types/console/generated/graphql-schema.ts [completed]
[03:17:18] Generate outputs [completed]
$ yarn --cwd packages/console-dynamic-plugin-sdk build
$ yarn clean && yarn validate && yarn compile && yarn generate
$ rm -rf dist generated
$ yarn ts-node scripts/validate-extensions.ts
$ ts-node -O '{"module":"commonjs"}' scripts/validate-extensions.ts
Validating Console extension types
Warnings (42)
    Extension type 'PVCCreateProp' has no JSDoc comments
    Extension type 'PVCStatus' has no JSDoc comments
    Extension type 'PVCAlert' has no JSDoc comments
    Extension type 'PVCDelete' has no JSDoc comments
    Extension type 'AddAction' has no JSDoc comments
    Extension type 'AddActionGroup' has no JSDoc comments
    Extension type 'ClusterGlobalConfig' has no JSDoc comments
    Extension type 'HrefNavItem' has no JSDoc comments
    Extension type 'ResourceNSNavItem' has no JSDoc comments
    Extension type 'ResourceClusterNavItem' has no JSDoc comments
    Extension type 'Separator' has no JSDoc comments
    Extension type 'NavSection' has no JSDoc comments
    Extension type 'FileUpload' has no JSDoc comments
    Extension type 'AlertAction' has no JSDoc comments
    Extension type 'AlertAction' property 'alert' has no JSDoc comments
    Extension type 'AlertAction' property 'text' has no JSDoc comments
    Extension type 'AlertAction' property 'action' has no JSDoc comments
    Extension type 'StorageProvider' has no JSDoc comments
    Extension type 'StorageProvider' property 'name' has no JSDoc comments
    Extension type 'StorageProvider' property 'Component' has no JSDoc comments
    Extension type 'TelemetryListener' has no JSDoc comments
    Extension type 'CatalogItemType' has no JSDoc comments
    Extension type 'CatalogItemProvider' has no JSDoc comments
    Extension type 'CatalogItemFilter' has no JSDoc comments
    Extension type 'PodAdapter' property 'adapt' has no JSDoc comments
    Extension type 'BuildAdapter' property 'adapt' has no JSDoc comments
    Extension type 'NetworkAdapter' property 'adapt' has no JSDoc comments
    Extension type 'TopologyDisplayFilters' property 'getTopologyFilters' has no JSDoc comments
    Extension type 'TopologyDisplayFilters' property 'applyDisplayOptions' has no JSDoc comments
    Extension type 'TopologyDecoratorProvider' property 'id' has no JSDoc comments
    Extension type 'TopologyDecoratorProvider' property 'priority' has no JSDoc comments
    Extension type 'TopologyDecoratorProvider' property 'quadrant' has no JSDoc comments
    Extension type 'TopologyDecoratorProvider' property 'decorator' has no JSDoc comments
    Extension type 'TopologyRelationshipProvider' property 'provides' has no JSDoc comments
    Extension type 'TopologyRelationshipProvider' property 'tooltip' has no JSDoc comments
    Extension type 'TopologyRelationshipProvider' property 'create' has no JSDoc comments
    Extension type 'TopologyRelationshipProvider' property 'priority' has no JSDoc comments
    Extension type 'CreateResource' has no JSDoc comments
    Extension type 'UserPreferenceGroup' has no JSDoc comments
    Extension type 'UserPreferenceItem' has no JSDoc comments
    Extension type 'Perspective' has no JSDoc comments
    Extension type 'HorizontalNavTab' has no JSDoc comments
$ for ext in '' '-internal' '-internal-kubevirt' '-webpack' ; do yarn tsc -p tsconfig${ext}.json ; done
$ /src/console/frontend/node_modules/.bin/tsc -p tsconfig.json
$ /src/console/frontend/node_modules/.bin/tsc -p tsconfig-internal.json
$ /src/console/frontend/node_modules/.bin/tsc -p tsconfig-internal-kubevirt.json
$ /src/console/frontend/node_modules/.bin/tsc -p tsconfig-webpack.json
$ yarn generate-schema && yarn generate-doc && yarn generate-pkg-assets
$ yarn ts-node scripts/generate-schema.ts
$ ts-node -O '{"module":"commonjs"}' scripts/generate-schema.ts
Generating Console plugin JSON schemas
generated/schema/plugin-package.json
generated/schema/plugin-package.cjs
generated/schema/console-extensions.json
generated/schema/console-extensions.cjs
generated/schema/plugin-manifest.json
generated/schema/plugin-manifest.cjs
$ yarn ts-node scripts/generate-doc.ts
$ ts-node -O '{"module":"commonjs"}' scripts/generate-doc.ts
Generating Console plugin documentation
generated/doc/console-extensions.md
$ yarn ts-node scripts/generate-pkg-assets.ts
$ ts-node -O '{"module":"commonjs"}' scripts/generate-pkg-assets.ts
Generating assets for package @openshift-console/dynamic-plugin-sdk
dist/core/package.json
dist/core/LICENSE
dist/core/README.md
dist/core/doc
Generating assets for package @openshift-console/dynamic-plugin-sdk-internal
dist/internal/package.json
dist/internal/LICENSE
dist/internal/README.md
Generating assets for package @openshift-console/dynamic-plugin-sdk-internal-kubevirt
dist/internal-kubevirt/package.json
dist/internal-kubevirt/LICENSE
dist/internal-kubevirt/README.md
Generating assets for package @openshift-console/dynamic-plugin-sdk-webpack
dist/webpack/package.json
dist/webpack/LICENSE
dist/webpack/README.md
dist/webpack/schema
Done in 81.87s.
Done in 517.69s.
Removing intermediate container f1e7d75f25c5
 ---> 5c0c54f06724
Step 6/15 : WORKDIR /src/console/dynamic-demo-plugin
 ---> Running in 435989216ce8
Removing intermediate container 435989216ce8
 ---> 387dd175360d
Step 7/15 : RUN yarn install &&     yarn build
 ---> Running in d375b8cc4108
yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > react-i18next.0" has unmet peer dependency "i18next@>= 19.0.0".
warning " > file-loader.11" has incorrect peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
[4/4] Building fresh packages...
Done in 59.65s.
yarn run v1.22.10
$ yarn clean && NODE_ENV=production yarn ts-node node_modules/.bin/webpack
$ rm -rf dist
$ ts-node -O '{"module":"commonjs"}' node_modules/.bin/webpack
(node:83) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.
BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
	Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
	Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.
(Use `node --trace-deprecation ...` to show where the warning was created)
assets by path *.js 1.74 MiB
  assets by chunk 1.7 MiB (id hint: vendors)
    asset 510-chunk-642b01dffdf6eb07e68d.min.js 1.68 MiB [emitted] [immutable] [minimized] [big] (id hint: vendors) 2 related assets
    asset 136-chunk-dffdb8c1527a07b0f907.min.js 17.7 KiB [emitted] [immutable] [minimized] (id hint: vendors) 1 related asset
  14 assets
assets by path assets/*.jpg 1.53 MiB
  assets by status 1.17 MiB [big]
    asset assets/pfbg_992 575 KiB [emitted] [big] (auxiliary id hint: vendors)
    asset assets/pfbg_768 354 KiB [emitted] [big] (auxiliary id hint: vendors)
    asset assets/pfbg_2000.jpg 270 KiB [emitted] [big] (auxiliary id hint: vendors)
  asset assets/pfbg_576 191 KiB [emitted] (auxiliary id hint: vendors)
  asset assets/pfbg_768.jpg 114 KiB [emitted] (auxiliary id hint: vendors)
  asset assets/pfbg_576.jpg 65.9 KiB [emitted] (auxiliary id hint: vendors)
asset plugin-manifest.json 7.17 KiB [emitted]
asset locales/en/plugin__console-demo-plugin.json 1.23 KiB [emitted] [from: ../locales/en/plugin__console-demo-plugin.json] [copied]
orphan modules 1.01 MiB [orphan] 624 modules
runtime modules 19.3 KiB 13 modules
built modules 2.44 MiB (javascript) 294 bytes (consume-shared) 168 bytes (share-init) [built] 306 modules

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets: 
  assets/pfbg_768 (354 KiB)
  assets/pfbg_2000.jpg (270 KiB)
  assets/pfbg_992 (575 KiB)
  510-chunk-642b01dffdf6eb07e68d.min.js (1.68 MiB)

webpack 5.62.1 compiled with 1 warning in 32158 ms
Done in 36.43s.
Removing intermediate container d375b8cc4108
 ---> 7a0a74214653
Step 8/15 : FROM node:10
 ---> 28dca6642db8
Step 9/15 : COPY --from=build /src/console/dynamic-demo-plugin/dist /opt/console-demo-plugin/static
 ---> 042411b458d1
Step 10/15 : COPY --from=build /src/console/dynamic-demo-plugin/node_modules /opt/console-demo-plugin/node_modules
 ---> bf51c63f7f1c
Step 11/15 : COPY --from=build /src/console/dynamic-demo-plugin/http-server.sh /opt/console-demo-plugin/http-server.sh
 ---> 57448998aa13
Step 12/15 : LABEL io.k8s.display-name="OpenShift Console Demo Plugin"       io.k8s.description="Sample OpenShift Console dynamic plugin used for testing purposes."       io.openshift.tags="openshift"       maintainer="Vojtech Szocs <vszocs>"
 ---> Running in 6e8b31543393
Removing intermediate container 6e8b31543393
 ---> c79d2c169598
Step 13/15 : USER node
 ---> Running in 039cf3a45327
Removing intermediate container 039cf3a45327
 ---> 3825c3cfb6f8
Step 14/15 : WORKDIR /opt/console-demo-plugin
 ---> Running in 52d15aaaf720
Removing intermediate container 52d15aaaf720
 ---> c6b327d95128
Step 15/15 : ENTRYPOINT [ "./http-server.sh", "./static" ]
 ---> Running in 1ac89a4bb40f
Removing intermediate container 1ac89a4bb40f
 ---> edc3f6b299f9
Successfully built edc3f6b299f9
Successfully tagged quay.io/yapei/console-demo-plugin:410

image can be successfully built, Dockerfile.plugins.demo2 is also updated with `frontend` dir removed

Comment 7 errata-xmlrpc 2022-03-10 16:24:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:0056