-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Emulate x86 so local dev is possible on arm64 machines #1142
Emulate x86 so local dev is possible on arm64 machines #1142
Conversation
Noteshttps://docs.docker.com/engine/reference/commandline/build docker/for-mac#5364 Additionally, there’s an env var which might be worth looking at: |
@longrunningprocess it appears that this branch includes the sass branch but doesn't have any pushed commits related to the |
I haven't made any yet, this PR is still in draft. Those commits are from my other PR that isn't merged into |
275b1da
to
1123840
Compare
@longrunningprocess I think I get it now - you wanted a place to keep notes on your research that would potentially result in code changes, but it turned out you didn't have any changes to propose at this time in a PR. I think you would be wanting an issue to keep notes on your research, not a draft PR. PRs only make sense for code changes, and any PR, draft or not, is an invitation for others to review your code. A draft PR is intended to publish work-in-progress where you invite others to comment on your code or see the direction you're going, but it is explicit that changes are not yet ready for review/merge. So in the future I would expect to see notes made in issues, and then PRs which summarize work done as code changes, linked to relevant issues. Thanks! |
Gotcha, that makes sense. Once I rebased and this thing closed without my wanting it to do that I was imagining you were going to be cracking up! I guess once I have changes to push into this branch I'll have to reopen it. |
got through the lfmerge problem, now finding this one: ⠙ ld-db Pulling 4.1s
no matching manifest for linux/arm64/v8 in the manifest list entries
make: *** [start] Error 18 |
failing on
|
failing docker-compose build app-for-e2e test-e2e
[+] Building 2.4s (6/6) FINISHED
=> [test-e2e internal] load build definition from Dockerfile 0.6s
=> => transferring dockerfile: 1.35kB 0.0s
=> [app-for-e2e internal] load build definition from Dockerfile 1.2s
=> => transferring dockerfile: 298B 0.0s
=> [test-e2e internal] load .dockerignore 0.9s
=> => transferring context: 2B 0.0s
=> [app-for-e2e internal] load .dockerignore 1.4s
=> => transferring context: 2B 0.0s
=> CANCELED [test-e2e internal] load metadata for docker.io/library/node:14.16.1-alpine3.11 1.2s
=> ERROR [app-for-e2e internal] load metadata for docker.io/library/lf-app:latest 0.7s
------
> [app-for-e2e internal] load metadata for docker.io/library/lf-app:latest:
------
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
make: *** [e2e-tests] Error 17
|
failing docker-compose-wait - Everything's fine, the application can now start!
--------------------------------------------------------
Waiting for a Protractor process to appear so the debugger can be attached...
> x-forge@1.0.0 test-e2e
> protractor test/app/protractorConf.js
[13:14:45] I/launcher - Running 1 instances of WebDriver
[13:14:45] I/hosted - Using the selenium server at http://selenium:4444/wd/hub
[13:14:52] E/launcher - unknown error: Chrome failed to start: crashed.
(chrome not reachable)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'e47f7750179c', ip: '172.20.0.8', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.47-linuxkit', java.version: '1.8.0_292'
Driver info: driver.version: unknown
remote stacktrace: #0 0x00400068e949 <unknown>
[13:14:52] E/launcher - WebDriverError: unknown error: Chrome failed to start: crashed.
(chrome not reachable)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'e47f7750179c', ip: '172.20.0.8', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.47-linuxkit', java.version: '1.8.0_292'
Driver info: driver.version: unknown
remote stacktrace: #0 0x00400068e949 <unknown>
at Object.checkLegacyResponse (/data/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/data/node_modules/selenium-webdriver/lib/http.js:509:13)
at /data/node_modules/selenium-webdriver/lib/http.js:441:30
at processTicksAndRejections (internal/process/task_queues.js:93:5)
From: Task: WebDriver.createSession()
at Function.createSession (/data/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
at Function.createSession (/data/node_modules/selenium-webdriver/chrome.js:761:15)
at createDriver (/data/node_modules/selenium-webdriver/index.js:170:33)
at Builder.build (/data/node_modules/selenium-webdriver/index.js:626:16)
at Hosted.getNewDriver (/data/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
at Runner.createBrowser (/data/node_modules/protractor/built/runner.js:195:43)
at /data/node_modules/protractor/built/runner.js:339:29
at _fulfilled (/data/node_modules/q/q.js:834:54)
at /data/node_modules/q/q.js:863:30
at Promise.promise.promiseDispatch (/data/node_modules/q/q.js:796:13)
[13:14:52] E/launcher - Process exited with error code 199
npm ERR! code 199
npm ERR! path /data
npm ERR! command failed
npm ERR! command sh -c protractor test/app/protractorConf.js
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-09-09T13_14_52_262Z-debug.log
make: *** [e2e-tests] Error 199
|
this seems like the most relevant info on the selenium issue: SeleniumHQ/docker-selenium#1076 I tried a couple of possibilities, none of which worked seamlessly like our original image:
I was able to see some output from selenium that it was ready (using the hub image) but no test output (not running or not outputting results as before) so based on SeleniumHQ/docker-selenium#1076 (comment), maybe we need to reconfigure things to have a service for the hub and another service for the headless browser portion, not sure. It will need some more investigation and testing. Maybe this is not something we need to necessarily get working on Apple Silicon at the moment if the E2E tests are still passing on TC. |
At this point, there are a couple of options as I see it:
I'm inclined to move on knowing I will not be able to run e2e tests on my m1 for now. I'm going to take this one out of draft under the assumption that will be ok, if not, this is where we can hash it out more. |
@megahirt mind testing |
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.
LGTM
These changes will make our project more compatible with Apple Silicon
Description
I have a new M1 machine and was running into docker build failures for
app
. This was the result of lfmerge not having an arm64 pkg. Creating one would be too much effort so this PR is the effort to emulate an x86 during the image build where lfmerge is used.Type of Change
configuration
Screenshots
N/A
How Has This Been Tested?
app
builds without errormake
creates a running app locally (with basic functionality testing)make unit-tests
should run all tests successfullymake e2e-tests
should run all tests successfullyChecklist: