Skip to content

[INTERNAL] Azure: Fix flaky tests on some Windows agents, set CI env variable #921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

RandomByte
Copy link
Member

@RandomByte RandomByte commented Jul 12, 2023

This is to workaround for the FATAL ERROR: v8::FromJust Maybe value is Nothing. errors we see for some of our Windows and macOS test executions on Azure.

The error is sporadic, but most consistently appears on Windows 2022 (Azure image '20230630.1.0' and Node v18.16.1.

avajs/ava#2947 seems to suggest this is a Node.js issue as reported at nodejs/node#43304

Disabling the use of our own worker threads in minifier.js resolve the issue. Disabling worker threads in AVA resolves it too.

Since we want to test our worker threads, we opted for the latter by setting the AVA option '--no-worker-threads' for all scripts executed in Azure.

All this indicates an issue with using worker threads (or the workerpool package) from within workers.

Also set the CI env variable for AVA to detect and make good use of.

@coveralls
Copy link

coveralls commented Jul 12, 2023

Coverage Status

coverage: 94.603% (+0.01%) from 94.589% when pulling 0f11a61 on azure-set-ci into 41fa2d6 on main.

This is to workaround for the
"FATAL ERROR: v8::FromJust Maybe value is Nothing." errors we see for
our Windows and macOS test executions on Azure.

The error is sporadic, but most consistently appears on Windows 2022
(Azure image '20230630.1.0' and Node v18.16.1.

avajs/ava#2947 seems to suggest this is a
Node.js issue as reported at nodejs/node#43304

Disabling the use of our own worker threads in minifier.js resolve the
issue. Disabling worker threads in AVA resolves it too.

Since we want to test our worker threads, we opted for the latter by
setting the AVA option '--no-worker-threads' for all scripts executed in
Azure.

All this indicates an issue with using worker threads (or the workerpool
package) from within workers.
@RandomByte RandomByte changed the title [INTERNAL] Azure: Set CI env variable [INTERNAL] Azure: Fix v8::FromJust Maybe value is Nothing issues on some agents, set CI env variable Jul 12, 2023
@RandomByte RandomByte marked this pull request as ready for review July 12, 2023 19:52
@RandomByte RandomByte changed the title [INTERNAL] Azure: Fix v8::FromJust Maybe value is Nothing issues on some agents, set CI env variable [INTERNAL] Azure: Fix flaky tests on some Windows agents, set CI env variable Jul 12, 2023
@RandomByte RandomByte requested a review from a team July 12, 2023 19:53
@RandomByte RandomByte merged commit ae92853 into main Jul 13, 2023
@RandomByte RandomByte deleted the azure-set-ci branch July 13, 2023 06:45
matz3 added a commit to SAP/ui5-fs that referenced this pull request Jul 13, 2023
This also solves the Node 20 issue initially addressed via #511.
However, it also addresses another issue that mainly appears in the
ui5-builder projects, see SAP/ui5-builder#921.

Tests may run a bit slower, but more stable.

JIRA: CPOUI5FOUNDATION-612
matz3 added a commit to SAP/ui5-server that referenced this pull request Jul 13, 2023
AVA's nodeArguments option doesn't seem to work with loaders on Node 20.
One solution is to disable worker threads to use child processes instead.
This should also stabilize test execution, especially when tests also
spawn new worker threads, which mainly appeared in ui5-builder.

See: SAP/ui5-fs#512
See: SAP/ui5-builder#921
JIRA: CPOUI5FOUNDATION-612
matz3 added a commit to SAP/ui5-server that referenced this pull request Jul 13, 2023
AVA's nodeArguments option doesn't seem to work with loaders on Node 20.
One solution is to disable worker threads to use child processes instead.
This should also stabilize test execution, especially when tests also
spawn new worker threads, which mainly appeared in ui5-builder.

See: SAP/ui5-fs#512
See: SAP/ui5-builder#921
JIRA: CPOUI5FOUNDATION-612
matz3 added a commit that referenced this pull request Jul 13, 2023
AVA's nodeArguments option doesn't seem to work with loaders on Node 20.
One solution is to disable worker threads to use child processes instead.

This solution has anyways already been applied via #921
and is now enabled for all test executions.

JIRA: CPOUI5FOUNDATION-612
matz3 added a commit that referenced this pull request Jul 14, 2023
AVA's nodeArguments option doesn't seem to work with loaders on Node 20.
One solution is to disable worker threads to use child processes instead.

This solution has anyways already been applied via #921
and is now enabled for all test executions.

JIRA: CPOUI5FOUNDATION-612
matz3 added a commit to SAP/ui5-server that referenced this pull request Jul 14, 2023
AVA's nodeArguments option doesn't seem to work with loaders on Node 20.
One solution is to disable worker threads to use child processes instead.
This should also stabilize test execution, especially when tests also
spawn new worker threads, which mainly appeared in ui5-builder.

See: SAP/ui5-fs#512
See: SAP/ui5-builder#921
JIRA: CPOUI5FOUNDATION-612
matz3 added a commit to SAP/ui5-fs that referenced this pull request Jul 14, 2023
This also solves the Node 20 issue initially addressed via #511.
However, it also addresses another issue that mainly appears in the
ui5-builder projects, see SAP/ui5-builder#921.

Tests may run a bit slower, but more stable.

JIRA: CPOUI5FOUNDATION-612
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants