-
Notifications
You must be signed in to change notification settings - Fork 379
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
Pieces of multiplatform support #696
Conversation
The content of tagging the latest image has three actors: * cypress-io (we) -- an entity that builds images * consumers (formerly: you) -- an entity that uses images * tagger (implicit you) -- an entity that is responsible for making new tags for images
* add article * add subject * add `:` before blob
Previously in order to create a tag, the actor had to download the image, tag it locally, and then upload the new image. Instead, introduce a way to create psuedo-tags for simple images that obviates the requirement to download images. Here we create a manifest containing a reference to the currently tagged image(s).
Default to building linux/amd64 and linux/arm64
Default to building linux/amd64 and linux/arm64
Default to building linux/amd64 and linux/arm64
@jsoref, thank you for your pull request. I built a dockerfile from your generate-included-image.js on my Mac M1. Then I attempted to create an image from the dockerfile but I get the following error messages: |
There's a line:
which should have created the instance... (you might want to get rid of the redirection to see if something exploded). I'm using Rancher Desktop fwiw... |
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.
Hey @jsoref! Thanks for opening this PR, it looks like it sets a good foundation.
I was actually also working on this over the last couple weeks, and have a PR at #700 that adds a little more, like building+testing in CI and console warnings for the images that are missing browsers on arm64
.
You're correct in that we will be missing browser binaries for now due to #695
We explored installing chromium
instead of chrome
as a fallback, but ended up not going that direction because users would have to type --browser chromium
on M1, and --browser chrome
everywhere else. It's difficult to grok and document, but "arm64 images don't have any browsers, use --browser electron
" is a lot easier to explain, so we're going that direction.
Closing since #700 will cover the majority of this functionality - again, thank you for spending the time looking in to this issue.
} | ||
|
||
unless (which('manifest-tool')) { | ||
print STDERR "Please install manifest-tool <https://github.com/estesp/manifest-tool>"; |
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.
👀 hadn't seen this, I've only been messing with docker buildx
and docker manifest
, both of which have... limitations... I might pull this in after #700 to make it easier for us to add arm64 builds to existing tags.
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.
I'm told one of these:
- https://github.com/regclient/regclient
- https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane.md
... might be a bit cleaner. But either way, downloading to just add a tag is silly (and potentially expensive use of bandwidth).
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.
@jsoref I noticed you removed the branch but I wanted to update you on what happened to my progress. I did remove the redirection and I then got passed that but then got the infamous qemu error that a lot of folks are getting with arm. Are you running your images on a Mac M1 or what machine are you using?
#0 64.71 [STARTED] Task without title.
#0 73.72 [FAILED] Cypress failed to start.
#0 73.72 [FAILED]
#0 73.72 [FAILED] This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies
#0 73.72 [FAILED]
#0 73.72 [FAILED] Please refer to the error below for more details.
#0 73.72 [FAILED]
#0 73.72 [FAILED] ----------
#0 73.72 [FAILED]
#0 73.72 [FAILED] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
#0 73.72 [FAILED] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
#0 73.72 [FAILED] qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#0 73.72 [FAILED]
#0 73.72 [FAILED] ----------
#0 73.72 [FAILED]
#0 73.72 [FAILED] Platform: linux-x64 (Debian - 10.11)
#0 73.72 [FAILED] Cypress Version: 10.3.0
#0 73.73 Cypress failed to start.
#0 73.73
#0 73.73 This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies
#0 73.73
#0 73.73 Please refer to the error below for more details.
#0 73.73
#0 73.73 ----------
#0 73.73
#0 73.73 qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
#0 73.73 qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
#0 73.73 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
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.
You can still access them, either by giving a new branch name to a thing, by visiting https://github.com/cypress-io/cypress-docker-images/commits/b3465b26da55d3c41febc56dab3f5364ae9dd78e and using the branch chooser.
or by doing something like git fetch origin refs/pull/696/head:my-new-branch
As for the error, the goal is to run the arm version of cypress on our M1s, not the x64 versions.
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.
@rnunezil: if you point me to the specific shas you're using and commands you're running, I'm happy to try to help.
(This isn't my primary task, but we do use cypress, so I'm glad to try to help out.)
#431 asks for arm64 images
This is a draft of some changes that would go part of the way.
Admittedly, if the browsers are missing arm builds, then the images would fail...
I've left the commits as distinct layers.
I believe that one could pull in all 3 of the contributing changes w/o issue and probably the base w/o issue. It's likely that things wouldn't work so well at the browser step.
#695 asks for arm64 images as well. It seems like the simplest approach would be to try to install chrome and fall back to installing chromium. On debian that should work. For Firefox, the canonical repositories (for ubuntu) include an official
firefox
, and on debian there's afirefox-esr
, so a bit of||
s should allow one to get one or the other.It doesn't appear that there's any easy fix for edge today as there don't appear to be packages floating around.