Bug 2023443 - Console plugin SDK build passes even if there are errors in one of its dist packages
Summary: Console plugin SDK build passes even if there are errors in one of its dist p...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.12.0
Assignee: Jakub Hadvig
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-15 17:45 UTC by Vojtech Szocs
Modified: 2023-01-17 19:47 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
No end user impact.
Clone Of:
Environment:
Last Closed: 2023-01-17 19:46:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 10444 0 None open Bug 2023443: Adjust Console plugin SDK dist pkg compilation 2021-11-15 17:46:37 UTC
Red Hat Product Errata RHSA-2022:7399 0 None None None 2023-01-17 19:47:09 UTC

Description Vojtech Szocs 2021-11-15 17:45:28 UTC
To build Console plugin SDK:

 $ cd frontend/packages/console-dynamic-plugin-sdk
 $ yarn build

This generates multiple distributable SDK packages:

 $ ls dist
 core  internal  internal-kubevirt  webpack

However, if one of these dist packages has build errors, the `yarn build` command may still exit with code 0 (OK result).


Steps to Reproduce:

1. edit tsconfig-internal.json and introduce an error, for example:

 -  "extends": "./tsconfig-base.json",
 +  "extends": "./tsconfig-base.json1",

2. run `yarn build ; echo $?`
3. exit code is 0, other dist packages are still built


Expected results:

Repeat steps 1. and 2. above. Exit code should be non-zero, build should stop immediately after encountering errors.

Comment 5 Yadan Pei 2022-07-18 08:45:51 UTC
1. edit tsconfig-internal.json and introduce an error, for example:

 -  "extends": "./tsconfig-base.json",
 +  "extends": "./tsconfig-base.json1",

2. run `yarn build ; echo $?`
.............. ~~~~~~~~~~~~~

tsconfig-internal.json:2:14 - error TS6053: File './tsconfig-base.json1' not found.

2   "extends": "./tsconfig-base.json1",
               ~~~~~~~~~~~~~~~~~~~~~~~


Found 78 errors.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2


the return code is 2 and `yarn build` stop immediately when error occurs

Comment 9 errata-xmlrpc 2023-01-17 19:46:49 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.12.0 bug fix and 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:7399


Note You need to log in before you can comment on or make changes to this bug.