webpack ignores build errors

Bug #1654051 reported by Honza Pokorny
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Honza Pokorny

Bug Description

When building the frontend code for the GUI, webpack will silently ignore builds errors, such as missing modules. This results in the exit being 0, instead of 1 (or more). Running "npm run build" succeeds even if an npm dependency is missing.

Steps to reproduce:

1. git clone git://github.com/openstack/tripleo-ui.git
2. cd tripleo-ui
3. npm install
4. rm -rf node_modules/react
5. npm run build

Webpack will show a whole bunch of errors related to the missing "react" package but the exit code will be 0.

Honza Pokorny (hpokorny)
Changed in tripleo:
assignee: nobody → Honza Pokorny (hpokorny)
tags: added: ui
Changed in tripleo:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ui (master)

Fix proposed to branch: master
Review: https://review.openstack.org/416712

Changed in tripleo:
status: New → In Progress
Julie Pichon (jpichon)
Changed in tripleo:
milestone: none → ocata-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ui (master)

Reviewed: https://review.openstack.org/416712
Committed: https://git.openstack.org/cgit/openstack/tripleo-ui/commit/?id=3c5bcbb0f7069345c50bffe9094689f2fa4bc256
Submitter: Jenkins
Branch: master

commit 3c5bcbb0f7069345c50bffe9094689f2fa4bc256
Author: Honza Pokorny <email address hidden>
Date: Wed Jan 4 15:09:43 2017 -0400

    Configure webpack to stop on error

    When building the project, we want webpack to die with an exit code
    other than 0. Otherwise, we risk masking and silently ignoring errors.

    Change-Id: Ic501effd3e9b21c785c09fc1ca189c8444b05f3c
    Closes-bug: 1654051

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ui (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/417866

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ui (stable/newton)

Reviewed: https://review.openstack.org/417866
Committed: https://git.openstack.org/cgit/openstack/tripleo-ui/commit/?id=9c414ca2f7247a4e6db56a75f3f275c4d6a789e9
Submitter: Jenkins
Branch: stable/newton

commit 9c414ca2f7247a4e6db56a75f3f275c4d6a789e9
Author: Honza Pokorny <email address hidden>
Date: Wed Jan 4 15:09:43 2017 -0400

    Configure webpack to stop on error

    When building the project, we want webpack to die with an exit code
    other than 0. Otherwise, we risk masking and silently ignoring errors.

    Change-Id: Ic501effd3e9b21c785c09fc1ca189c8444b05f3c
    Closes-bug: 1654051
    (cherry picked from commit 3c5bcbb0f7069345c50bffe9094689f2fa4bc256)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-ui (master)

Reviewed: https://review.openstack.org/420649
Committed: https://git.openstack.org/cgit/openstack/tripleo-ui/commit/?id=566c383723bd0d8126c55415896f44a780d46808
Submitter: Jenkins
Branch: master

commit 566c383723bd0d8126c55415896f44a780d46808
Author: Jiri Tomasek <email address hidden>
Date: Mon Jan 16 12:11:53 2017 +0100

    Don't bail webpack by default

    bail: true option in webpack.config.js causes webpack to stop building
    which is not convenient for development process, as webpack command
    then needs to be restarted. For dev we want to keep webpack running so
    when problem is fixed, it gets automatically recompiled and browser
    refreshed

    --bail option should be enough for build
    process where we want webpack to fail incase of error.

    Related-Bug: 1654051
    Change-Id: Id8ce7a2d08b8cd9e3efa5dc51a3eb6cb9ba15efe

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ui 3.0.0

This issue was fixed in the openstack/tripleo-ui 3.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ui 7.0.0

This issue was fixed in the openstack/tripleo-ui 7.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ui 1.2.0

This issue was fixed in the openstack/tripleo-ui 1.2.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.