Bug 2023443

Summary: Console plugin SDK build passes even if there are errors in one of its dist packages
Product: OpenShift Container Platform Reporter: Vojtech Szocs <vszocs>
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.9CC: aos-bugs, jcaiani, yapei
Target Milestone: ---   
Target Release: 4.12.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
No end user impact.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-17 19:46:49 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 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