Opened on 10/11/2017 at 10:07:54 PM

Closed on 10/13/2017 at 10:28:06 AM

#5857 closed defect (fixed)

ensure_dependencies.py does not resolve Node.js dependencies if a previous installation failed

Reported by: tlucas Assignee:
Priority: P3 Milestone:
Module: Automation Keywords:
Cc: sebastian, kzar Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29573912

Description (last modified by tlucas)

How to reproduce

  1. Make sure to have an environment where nodejs / npm is not installed
  2. Clone the adblockpluschrome repository hg clone https://hg.adblockplus.org/adblockpluschrome
  3. Go into the repository's root folder and resolve any needed dependencies python ensure_dependencies.py
  4. Install Node.js / npm
  5. Try to resolve the depencies again: python ensure_dependencies.py

Observed behaviour

  • At step 3, an Error is raised:
    ERROR: Failed to install Node.js dependencies for /home/foo/adblockpluschrome/buildtools, please ensure Node.js is installed.
    
  • At step 5, nothing happens

Expected behaviour

If npm install previously failed, ensure_dependencies.py should call it again regardless of dependency changes.

Hints for testers

In order to let npm install fail, you can edit the buildtools' package.json to contain a package which does not exist:

{
  "name": "buildtools",
  "repository": "https://hg.adblockplus.org/buildtools",
  "license": "MPL-2.0",
  "dependencies": {
    "foodoesntexist": "1.3"
  },
  "scripts": {
    "jsdoc": "jsdoc"
  }
}

The behavior on failure can then be verified, as well as the desired behavior on retrial (if you undo the changes to package.json)

Attachments (0)

Change History (5)

comment:1 Changed on 10/11/2017 at 10:12:31 PM by sebastian

  • Description modified (diff)
  • Priority changed from Unknown to P3
  • Ready set

comment:2 Changed on 10/11/2017 at 10:45:09 PM by tlucas

  • Description modified (diff)

comment:3 Changed on 10/11/2017 at 10:49:57 PM by tlucas

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:4 Changed on 10/13/2017 at 10:27:13 AM by abpbot

A commit referencing this issue has landed:
Issue 5857 - Retry npm install on failure

comment:5 Changed on 10/13/2017 at 10:28:06 AM by tlucas

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
 
Note: See TracTickets for help on using tickets.