webstaff build/test failures related to IDL2js

Bug #1618136 reported by Jeff Godin on 2016-08-29
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Medium
Unassigned

Bug Description

webstaff build/test fails at the "grunt all" stage with output similar to the following:

Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket E-V9KUKBTz4dsNOeLMmk with id 43910801
PhantomJS 2.1.1 (Linux 0.0.0) ERROR
  SyntaxError: Unexpected EOF
  at /home/opensrf/Evergreen/Open-ILS/web/js/ui/default/staff/test/data/IDL2js.js:2

PhantomJS 2.1.1 (Linux 0.0.0): Executed 0 of 0 ERROR (0.113 secs / 0 secs)

Warning: Task "karma:unit" failed. Use --force to continue.

Aborted due to warnings.

If you go choose to use "grunt all --force" to ignore the test failure warning, then the remaining tasks complete and in the end you do appear to have a functioning install, including webstaff.

Jeff Godin (jgodin) wrote :

When examining the file referenced in the test failure, we find that it is not valid Javascript, and the problem seems to be with SQL query strings being included, newlines and all.

Changes to the IDL in commit 91f844b introduced a requirement for additional pre-processing of the IDL before fm_IDL2js.xml can be expected to generate output that is valid Javascript.

OpenILS::WWW::IDL2js was modified to perform this pre-processing, but there is one other stock consumer of fm_IDL2js.xsl at present:

Open-ILS/web/js/ui/default/staff/test/data/idl2js.pl is used to generate IDL2js.js which is then used in webstaff tests.

The working branch at user/jeff/lp1618136_fix_webstaff_test_failures includes a proposed fix: simply add the pre-processing steps from OpenILS::WWW::IDL2js to the test support script idl2js.pl

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jeff/lp1618136_fix_webstaff_test_failures

tags: added: pullrequest
Changed in evergreen:
milestone: 2.11-beta → 2.11-rc
assignee: Jeff Godin (jgodin) → nobody
Ben Shum (bshum) wrote :

Works for my testing in Xenial VM. Jeff's fix works for me.

Signoff branch: user/bshum/lp1618136_fix_webstaff_test_failures

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/bshum/lp1618136_fix_webstaff_test_failures

tags: added: signedoff
Changed in evergreen:
status: In Progress → Confirmed
importance: Undecided → Medium
Dan Wells (dbw2) wrote :

Pushed to master, thanks guys!

Changed in evergreen:
milestone: 2.11-rc → 2.11-beta
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers