[FOLIO-1377] debug PR test failure issue in ui-inventory Created: 25/Jul/18  Updated: 12/Nov/18  Resolved: 25/Jul/18

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P1
Reporter: Jakub Skoczen Assignee: Niels Erik Nielsen
Resolution: Done Votes: 0
Labels: sprint43
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: PNG File Screenshot from 2018-07-25 19-07-41.png     PNG File Screenshot from 2018-07-25 19-07-49.png     PNG File Screenshot from 2018-07-25 19-08-06.png     PNG File screenshot-1.png     PNG File screenshot-2.png     PNG File screenshot-3.png    
Issue links:
Relates
relates to FOLIO-1338 Regression tests fail consistently in... Closed
Sprint:

 Description   

Niels Erik Nielsen on FOLIO-1338 Closed John Malconian described the steps to build the stripes bundle locally so it matches the build process in the CI. This should allows us to debug locally the reasons for why PR tests fail.

From John:

Steps that simulate a PR build in Jenkins (using ui-users as example):

Prep Project Repo:

Checkout a "feature" branch of a UI module. Merge master branch into branch.
Update the version in the package.json to something unique. e.g. append '-pr-test-2'.
yarn install
Build Platform Bundle:

Clone 'platform-core' from Git.
Grab folio-snapshot-stable's yarn.lock file. e.g. 'wget http://folio-snapshot-stable.aws.indexdata.com/yarn.lock' (NOTE: I recently disabled this step)
Add UI module we checked out previously to the platform. For example, 'yarn add file:../ui-users && yarn upgrade @folio/users'
Build bundle utilizing Stripes CLI which is installed globally - 'stripes build --okapi http://folio-snapshot-stable.aws.indexdata.com:9130 --tenant pr_433_4 stripes.config.js bundle'. In this case, 'pr_433_4' is the name of the new tenant that will subsequently be created on folio-snapshot-stable. For purposes of testing, you may specify an existing tenant that has already been created from a previous PR or just specify 'diku'.
Jenkins uses the NPM package, 'http-server', to serve up the bundle. 'http-server -p 3000 ./bundle &'
Deploy new tenant and enable modules:

For the sake of manual testing, this step can be skipped. Use an existing tenant.
Run UI Regression tests:

git clone ui-testing repo
add the project we are testing. e.g. 'yarn add file:../ui-users && yarn upgrade @folio/users'
set env FOLIO_UI_USERNAME to the tenant admin which is always $

{TENANT}

_admin

set env FOLIO_UI_PASSWORD to 'admin'
set env FOLIO_UI_URL to 'http://localhost:3000' (where our test bundle is served up)
Invoke partial test with 'xfvb-run' - 'xvfb-run --server-args="-screen 0 1024x768x24 yarn test-module -o --run=users'



 Comments   
Comment by Niels Erik Nielsen [ 25/Jul/18 ]

Jakub Skoczen
Matthew Jones already went through these steps last week, ref. https://folio-org.atlassian.net/browse/FOLIO-1338?focusedCommentId=194381&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel,

and found that it errors out for several UI modules with messages like this:

This would explain the PR test failures.

Comment by Niels Erik Nielsen [ 25/Jul/18 ]

I went through the same steps, and still find that behavior for ui-users and ui-inventory.

With ui-user checkout, no yarn.lock

rm -rf platform-core
git clone https://github.com/folio-org/platform-core
cd platform-core
yarn add file:../ui-users && yarn upgrade @folio/users
stripes build --okapi http://folio-snapshot-stable.aws.indexdata.com:9130 --tenant diku stripes.config.js bundle
http-server -p 3000 ./bundle

UI-users does:

UI-inventory works on first access, on second it says:

Users settings do:

Comment by Niels Erik Nielsen [ 25/Jul/18 ]

Finally, yarn adding ui-inventory (instead of ui-users as before):

rm -rf platform-core
git clone https://github.com/folio-org/platform-core
cd platform-core
yarn add file:../ui-inventory && yarn upgrade @folio/inventory
stripes build --okapi http://folio-snapshot-stable.aws.indexdata.com:9130 --tenant diku stripes.config.js bundle
http-server -p 3000 ./bundle

Comment by Niels Erik Nielsen [ 25/Jul/18 ]

Conclusion: Both ui-user and ui-inventory consistently error out when they are "yarn added", using the build steps given in the description (excluding fetching the yarn.lock which breaks stripes build for me). The same modules (same versions) work if they are installed as part of a regular yarn install – that is, doing the same steps but not yarn add-ing particular modules.

Users:

Inventory:

Cannot look into the past, but if my scripts reflect what's happening in the PR, I'm guessing these errors are why the PR's have consistently failed for some time.

Comment by Niels Erik Nielsen [ 26/Jul/18 ]

As suggested on the testing meet just now, this is a test run based on the ui-inventory PR test build. It fails according to the same pattern as all the PR tests for ui-inventory, ui-users, and others in recent weeks.

(The service built with:

rm -rf platform-core
git clone https://github.com/folio-org/platform-core
cd platform-core
yarn add file:../ui-inventory && yarn upgrade @folio/inventory
stripes build --okapi http://folio-snapshot-stable.aws.indexdata.com:9130 --tenant diku stripes.config.js bundle
http-server -p 3000 ./bundle

)

Generated at Thu Feb 08 23:12:53 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.