Update Admin UI build tools

Description

We are using very outdated versions of both NPM and Node in the Admin UI build system. Also, a lot of the involved grunt plugins are outdated.

Recently, I've run into an issue that causes me just too much headache to be willing to use those old version any longer: For another project, I've installed a newer NPM version globally.
When checking out the Opencast repository from scratch, I've ran into various issues when building the module matterhorn-admin-ui-ng. The only way I've found to make that work is to uninstall npm and node completely (rm -rf node* does not help).

It seems that the newer versions of NPM and Node just work better when it comes to that kind of "chaos"

The goal of this task is to update all tools and libraries used by the Admin UI build system to their newest versions.

Activity

Show:
Sven Stauber
July 17, 2017, 9:49 AM

"Just" updating the versions to NPM 5.3.0 (most recent) and Node 8.1.4 (most recent) basically works, but two tests of the Admin UI facade interestingly start to fail:

Failed tests:
AbstractEventEndpointTest.testGetEventMetadata:249
Expected: "[{\"flavor\":\"dublincore\/episode\",\"title\":\"name 1\",\"fields\":[{\"readOnly\":false,\"id\":\"title\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.TITLE\",\"type\":\"text\",\"value\":\"title\",\"required\":true},{\"readOnly\":false,\"id\":\"subject\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.SUBJECT\",\"type\":\"mixed_text\",\"value\":[],\"required\":false},{\"readOnly\":false,\"id\":\"description\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.DESCRIPTION\",\"type\":\"text_long\",\"value\":\"\",\"required\":false},{\"readOnly\":false,\"id\":\"startDate\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.START_DATE\",\"type\":\"date\",\"value\":\"2013-03-20T04:00:00Z\",\"required\":false},{\"readOnly\":false,\"id\":\"isPartOf\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.SERIES\",\"type\":\"text\",\"value\":\"seriesId\",\"required\":false},{\"readOnly\":false,\"id\":\"location\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.LOCATION\",\"type\":\"text\",\"value\":\"\",\"required\":false},{\"readOnly\":false,\"id\":\"type\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.TYPE\",\"type\":\"text\",\"value\":\"\",\"required\":false},{\"readOnly\":false,\"id\":\"audience\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.AUDIENCE\",\"type\":\"text\",\"value\":\"\",\"required\":false},{\"readOnly\":false,\"id\":\"creator\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.PRESENTERS\",\"type\":\"mixed_text\",\"value\":[],\"required\":false},{\"readOnly\":false,\"id\":\"contributor\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.CONTRIBUTORS\",\"type\":\"mixed_text\",\"value\":[],\"required\":false},{\"readOnly\":false,\"id\":\"rights\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.RIGHTS\",\"type\":\"mixed_text\",\"value\":[],\"required\":false},{\"readOnly\":false,\"id\":\"rightsHolder\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.RIGHTS_HOLDER\",\"type\":\"mixed_text\",\"value\":[],\"required\":false},{\"readOnly\":false,\"id\":\"license\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.LICENSE\",\"type\":\"text\",\"value\":\"\",\"required\":false},{\"readOnly\":false,\"id\":\"language\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.LANGUAGE\",\"type\":\"text\",\"value\":\"\",\"required\":false},{\"readOnly\":true,\"id\":\"createdBy\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.CREATED_BY\",\"type\":\"text\",\"value\":\"\",\"required\":false},{\"readOnly\":true,\"id\":\"created\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.CREATED\",\"type\":\"date\",\"value\":\"\",\"required\":false},{\"readOnly\":true,\"id\":\"identifier\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.ID\",\"type\":\"text\",\"value\":\"asdasd\",\"required\":false},{\"readOnly\":false,\"id\":\"source\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.SOURCE\",\"type\":\"text\",\"value\":\"\",\"required\":false}]}]"
but: [0].fields[]: Expected 18 values but got 19
MetadataListTest.testLocked:93
Expected: "[{\"flavor\":\"dublincore\/episode\",\"locked\":\"EVENTS.EVENTS.DETAILS.METADATA.LOCKED.RUNNING\",\"title\":\"EVENTS.EVENTS.DETAILS.CATALOG.EPISODE\",\"fields\":[{\"readOnly\":true,\"id\":\"title\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.TITLE\",\"type\":\"text\",\"value\":\"\",\"required\":true},{\"readOnly\":true,\"id\":\"subject\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.SUBJECT\",\"type\":\"mixed_text\",\"value\":[],\"required\":false},{\"readOnly\":true,\"id\":\"description\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.DESCRIPTION\",\"type\":\"text_long\",\"value\":\"\",\"required\":false},{\"readOnly\":true,\"id\":\"startDate\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.START_DATE\",\"type\":\"date\",\"value\":\"\",\"required\":false},{\"readOnly\":true,\"id\":\"isPartOf\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.SERIES\",\"type\":\"text\",\"value\":\"\",\"required\":false},{\"readOnly\":true,\"id\":\"location\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.LOCATION\",\"type\":\"text\",\"value\":\"\",\"required\":false},{\"readOnly\":true,\"id\":\"type\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.TYPE\",\"type\":\"text\",\"value\":\"\",\"required\":false},{\"readOnly\":true,\"id\":\"audience\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.AUDIENCE\",\"type\":\"text\",\"value\":\"\",\"required\":false},{\"readOnly\":true,\"id\":\"creator\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.PRESENTERS\",\"type\":\"mixed_text\",\"value\":[],\"required\":false},{\"readOnly\":true,\"id\":\"contributor\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.CONTRIBUTORS\",\"type\":\"mixed_text\",\"value\":[],\"required\":false},{\"readOnly\":true,\"id\":\"rights\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.RIGHTS\",\"type\":\"mixed_text\",\"value\":[],\"required\":false},{\"readOnly\":true,\"id\":\"rightsHolder\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.RIGHTS_HOLDER\",\"type\":\"mixed_text\",\"value\":[],\"required\":false},{\"readOnly\":true,\"id\":\"license\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.LICENSE\",\"type\":\"text\",\"value\":\"\",\"required\":false},{\"readOnly\":true,\"id\":\"language\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.LANGUAGE\",\"type\":\"text\",\"value\":\"\",\"required\":false},{\"readOnly\":true,\"id\":\"createdBy\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.CREATED_BY\",\"type\":\"text\",\"value\":\"\",\"required\":false},{\"readOnly\":true,\"id\":\"created\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.CREATED\",\"type\":\"date\",\"value\":\"\",\"required\":false},{\"readOnly\":true,\"id\":\"identifier\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.ID\",\"type\":\"text\",\"value\":\"\",\"required\":false},{\"readOnly\":true,\"id\":\"source\",\"label\":\"EVENTS.EVENTS.DETAILS.METADATA.SOURCE\",\"type\":\"text\",\"value\":\"\",\"required\":false}]}]"
but: [flavor=dublincore/episode].fields[]: Expected 18 values but got 19

Sven Stauber
July 17, 2017, 9:50 AM

Even more interestingly, I've found (in the surefire report):

but: [flavor=dublincore/episode].fields[]: Expected 18 values but got 19
at org.opencastproject.adminui.endpoint.MetadataListTest.testLocked(MetadataListTest.java:93)
</failure>
<system-out><![CDATA[10:44:55 INFO (ConfigurableEventDCCatalogUIAdapter:96) - Updated dublin core catalog UI adapter EVENTS.EVENTS.DETAILS.CATALOG.EPISODE for flavor dublincore/episode
10:44:55 ERROR (ConfigurableEventDCCatalogUIAdapter:113) - Skipping metadata field 'startTime' because of error: java.lang.IllegalArgumentException: Unknown metadata type! START_TIME
at org.opencastproject.index.service.catalog.adapter.DublinCoreMetadataCollection.addField(DublinCoreMetadataCollection.java:188)
at org.opencastproject.index.service.catalog.adapter.events.ConfigurableEventDCCatalogUIAdapter.populateEmptyFields(ConfigurableEventDCCatalogUIAdapter.java:111)
at org.opencastproject.index.service.catalog.adapter.events.ConfigurableEventDCCatalogUIAdapter.getRawFields(ConfigurableEventDCCatalogUIAdapter.java:103)
at org.opencastproject.adminui.endpoint.MetadataListTest.testLocked(MetadataListTest.java:90)

Assignee

Sven Stauber

Reporter

Sven Stauber

Tags (folksonomy)

None

Components

Fix versions

Affects versions

Priority

Minor
Configure