-
Notifications
You must be signed in to change notification settings - Fork 150
Enable multi-arch support in downloads #343
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
Conversation
|
Hi @yselkowitz. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/hold |
| os.mkdir(arch) | ||
| for operating_system in ['linux', 'mac', 'windows']: | ||
| os.mkdir(os.path.join(arch, operating_system)) | ||
| for arch in ['arm64', 'ppc64le', 's390x']: |
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.
To make this usable you would also need to update the the generated downloads links:
https://github.com/openshift/console-operator/blob/master/pkg/console/controllers/clidownloads/controller.go#L155
This will update the links in the console itself.
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.
This is when it would be ideal to have 1 place for this data.
I'm tempted to suggest we would add this annotation to the deployment:
annotations:
release.openshift.io/create-only: "true"And then cut the spec and add from within the operator itself. This would let the operator generate both the cliDownloadsLinks CR & this script from the same source struct.
@spadgett @wking not sure if there are any objections to further work in this deployment. Personally I'm not super jazzed about adding logic for string manipulation, since this script is just a bit embedded string, but I don't really love the manual sync of multiple resources either.
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.
If the script is static, I'd keep it as a manifest. I'd only generate the downloads deployment in the operator if we need some logic, for instance, if we decide to make the node selector customizable.
cc @bparees
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.
Its probably time to add an e2e test to this and validate that an http request to each of these endpoints is valid.
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.
For docs purposes, the old link to the mirror is gone:
https://github.com/openshift/console/pull/2951/files#diff-f2e8b14c70b3c8bf99b5eed3b019db60L46
We no longer hard-code this:
https://github.com/openshift/console/pull/2951/files#diff-20ab917f3e7dc4814ce688ea3e52044eL67
Since we now do what I referenced above with the CLIDownloadsController.
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.
Mac and Windows still only cover one architecture, but that treats them as if they might cover all of them with an error if it (not surprisingly) does not. That seems like a lot of overhead for a result for which we already know the answer.
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.
Mac and Windows still only cover one architecture, but that treats them as if they might cover all of them with an error if it (not surprisingly) does not.
A warning, not an error.
That seems like a lot of overhead for a result for which we already know the answer.
We don't know the answer, it depends on which cli-artifacts gets used for this deployment. Maybe later they do grow additional architectures, or maybe we drop an arch, or grow a new OS, or whatever. I don't think this deployment should be opinionated. It should just look in the places that might be there, serve what it has, and 404 requests for content it doesn't have.
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.
Is it really possible to have a cli-artifacts out of sync with console-operator? if not, then we do know which architectures are available, do we not?
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.
Is it really possible to have a cli-artifacts out of sync with console-operator?
Sure. For example, we could decide we want to publish a windows/arm64 oc, add it to cli-artifacts, and my standard-path approach (which I just pushed up as #354), would immediately serve it (although you'd still need a console bump to get an entry in PlatformBasedOCConsoleCLIDownloads). And if we wanted to avoid a PlatformBasedOCConsoleCLIDownloads bump, we could serve the choices dynamically from the downloads pod. Hmm... :)
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.
It would definitely be nice to have a single source of truth and not have to sync these two items. That said, most who use the console will probably want one of the "mainstream" versions of oc, so clusttering up the UI with all the things may not be that valuable.
|
/ok-to-test Pretty sure downloads will die without a full cli-artifacts to work from, but let's see... |
|
errors in test: Means you will have to fix |
|
Opened #344 to add tests for our |
|
/retest
|
|
Repushed with corresponding changes for the unit test. |
|
/retest |
1 similar comment
|
/retest |
|
E2E merged: |
|
/retest e2e-aws-operator Expected e2e func to be broken. |
|
/test e2e-gcp |
|
/hold cancel |
|
/test e2e-gcp |
| {"Linux for Power LE", "ppc64le/linux", "oc.tar"}, | ||
| {"Linux for Z", "s390x/linux", "oc.tar"}, | ||
| {"Mac", "amd64/mac", "oc.zip"}, | ||
| {"Windows", "amd64/windows", "oc.zip"}, |
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'd prefer if these were "for amd64" or "for x86-64" or whatever Red Hat's preferred name for the architecture is instead of leaving it implicit. Incidentally, Wikipedia uses x86-64, not X86-64, and the RHEL 8 download page has x86_64, although Linux says the underscore form is a later thing.
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.
By "implicit" are you referring to "Mac" and "Windows"? My patch does not change the name of those, and doing so might be more appropriate for a separate PR.
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.
Repushed with (hopefully) more "offical" names for the Linux architectures (not that there is ever any consistency with these names).
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.
By "implicit" are you referring to "Mac" and "Windows"?
Yup.
My patch does not change the name of those, and doing so might be more appropriate for a separate PR.
I'm not a maintainer here, but "add qualifying arch names to download links for all existing downloads" seems in-scope for a PR that adds multi-arch support ;).
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 changed "Windows" to "Windows 64-bit" in a new commit. I see no use to adding anything to "Mac", as only 64-bit Intel is currently supported.
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 don't think "64-bit" is sufficiently qualified (seems like it would also include arm64, etc.). I also think we need to be explicit about Mac, because folks could be running macOS/Darwin on other arches even if we don't support running oc on those arches. I've filed #353 to address both points, PTAL.
|
/test e2e-gcp |
1 similar comment
|
/test e2e-gcp |
In order for console-operator deployment to succeed, cli-artifacts needs to be available on all arches for downloads-openshift-console. However, in that case, /usr/bin/oc (inherited from cli) is a native binary, and we want to provide all primary Linux architectures to match those on mirror.openshift.com, regardless of cluster architecture. This depends on openshift/oc#153 to provide the new binaries in cli-artifacts.
|
/retest |
|
/lgtm I think we are good to go with this now. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: benjaminapetersen, yselkowitz The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
…Mac/Windows Folks could presumably be running these OSes on other architectures. For example, the GOOS/GOARCH docs [1] provide for darwin on 386, amd64, arm, and arm64 and windows on 386 and amd64 (although Windows runs on ARM64 [2] and possibly other architectures as well). I'm sticking with x86_64 for consistency with the Linux entry from 865d84d (Enable multi-arch Linux links in clidownloads, 2019-11-08, openshift#343), although Linus says the x86-64 form predates the underscore form [3]. [1]: https://golang.org/doc/install/source#environment [2]: https://docs.microsoft.com/en-us/windows/arm/ [3]: https://lkml.org/lkml/2004/2/21/110
…Mac/Windows Folks could presumably be running these OSes on other architectures. For example, the GOOS/GOARCH docs [1] provide for darwin on 386, amd64, arm, and arm64 and windows on 386 and amd64 (although Windows runs on ARM64 [2] and possibly other architectures as well). I'm sticking with x86_64 for consistency with the Linux entry from 865d84d (Enable multi-arch Linux links in clidownloads, 2019-11-08, openshift#343), although Linus says the x86-64 form predates the underscore form [3]. [1]: https://golang.org/doc/install/source#environment [2]: https://docs.microsoft.com/en-us/windows/arm/ [3]: https://lkml.org/lkml/2004/2/21/110
In order for console-operator deployment to succeed, cli-artifacts needs to be available on all arches for downloads-openshift-console. However, in that case, /usr/bin/oc (inherited from cli) is a native binary, and we want to provide all primary Linux architectures to match those on mirror.openshift.com, regardless of cluster architecture.
This depends on openshift/oc#153 to provide the new binaries in cli-artifacts.
Because this affects cluster deployment, we are looking to get this into 4.2 and later branches (we can provide separate PRs for stable branches as needed).