-
Notifications
You must be signed in to change notification settings - Fork 6
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
Set necessary flags for headless mode #50
Conversation
Did you test this with our service? |
I tested changing the karma.conf.js file with our service and I tested changing the docker image and running it locally, mounting the app inside to run the test. Do you have concerns for that method? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When testing this with the master using a suitable node-based reference-project branch we get:
24 01 2024 11:53:10.738:INFO [karma-server]: Karma v5.2.3 server started at http://localhost:9876/
24 01 2024 11:53:10.739:INFO [launcher]: Launching browsers ChromeHeadless with concurrency unlimited
(node:72) [log4js-node-DEP0004] DeprecationWarning: Pattern %d{DATE} is deprecated due to the confusion it causes when used. Please use %d{DATETIME} instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:72) [log4js-node-DEP0004] DeprecationWarning: Pattern %d{DATE} is deprecated due to the confusion it causes when used. Please use %d{DATETIME} instead.
24 01 2024 11:53:10.745:INFO [launcher]: Starting browser ChromeHeadless
(node:72) [log4js-node-DEP0004] DeprecationWarning: Pattern %d{DATE} is deprecated due to the confusion it causes when used. Please use %d{DATETIME} instead.
24 01 2024 11:53:10.894:ERROR [launcher]: Cannot start ChromeHeadless
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
[0124/115310.889453:FATAL:zygote_host_impl_linux.cc(200)] Check failed: . : Operation not permitted (1)
...
When testing this with the HEAD of the PR-branch and the same reference-project we get:
node@ed84cd8346ad:/work$ npm run test
> [email protected] test
> karma start
24 01 2024 11:56:30.091:INFO [karma-server]: Karma v5.2.3 server started at http://localhost:9876/
24 01 2024 11:56:30.092:INFO [launcher]: Launching browsers ChromeHeadless with concurrency unlimited
(node:193) [log4js-node-DEP0004] DeprecationWarning: Pattern %d{DATE} is deprecated due to the confusion it causes when used. Please use %d{DATETIME} instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:193) [log4js-node-DEP0004] DeprecationWarning: Pattern %d{DATE} is deprecated due to the confusion it causes when used. Please use %d{DATETIME} instead.
24 01 2024 11:56:30.099:INFO [launcher]: Starting browser ChromeHeadless
(node:193) [log4js-node-DEP0004] DeprecationWarning: Pattern %d{DATE} is deprecated due to the confusion it causes when used. Please use %d{DATETIME} instead.
24 01 2024 11:56:30.364:INFO [Chrome Headless 120.0.6099.224 (Linux aarch64)]: Connected on socket NCbw8mEtykd943OmAAAA with id 97942650
(node:193) [log4js-node-DEP0004] DeprecationWarning: Pattern %d{DATE} is deprecated due to the confusion it causes when used. Please use %d{DATETIME} instead.
ERROR: '2024-01-24 11:56:31.709800 failed to load JavaScript resource: fioribasapp/Component-preload.js - sap.ui.ModuleSystem'
ERROR: '2024-01-24 11:56:33.421500 Connector (LrepConnector) failed call 'loadFlexData': Error: Not Found
Application startup continues without data from this storage. - '
ERROR: '2024-01-24 11:56:33.569199 Connector (LrepConnector) failed call 'loadFeatures': Error: Not Found
Application startup continues without data from this storage. - '
Chrome Headless 120.0.6099.224 (Linux aarch64): Executed 2 of 2 SUCCESS (3.086 secs / 2.669 secs)
TOTAL: 2 SUCCESS
node@ed84cd8346ad:/work$ echo $?
0
✅
remark: I was not able to build the project with the java-jre dependency since I was not able to resolve that dependency. Hence I removed installing openjdk-jre.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has been tested together with Marcus and it works as desired. Thank you!
@CCFenner @anilkeshav27 I'm not sure we should take this path suggested with this PR. One can alternatively set these flags in the sources, e.g. in the karma.conf.js file. I'm leaning more towards the latter. What do you think? |
We have decided to solve this for our service only. We don't want to set flags for everybody using these images, as we cannot know all use cases. |
Without these flags the user has to set these in their comfiguration, e.g. karma.conf.js:
As this image is intended for automation and will always run in headless mode, we should set these flags for a simpler setup for the users.