Skip to content

Conversation

@yselkowitz
Copy link
Contributor

@yselkowitz yselkowitz commented Nov 8, 2019

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).

@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 8, 2019
@openshift-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 8, 2019
@yselkowitz
Copy link
Contributor Author

yselkowitz commented Nov 8, 2019

/hold
until the cli-artifacts change is merged:
openshift/oc#153

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 8, 2019
os.mkdir(arch)
for operating_system in ['linux', 'mac', 'windows']:
os.mkdir(os.path.join(arch, operating_system))
for arch in ['arm64', 'ppc64le', 's390x']:
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Member

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

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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... :)

Copy link
Contributor

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.

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 8, 2019
@wking
Copy link
Member

wking commented Nov 9, 2019

/ok-to-test

Pretty sure downloads will die without a full cli-artifacts to work from, but let's see...

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 9, 2019
@benjaminapetersen
Copy link
Contributor

benjaminapetersen commented Nov 11, 2019

errors in test:

# github.com/openshift/console-operator/pkg/console/controllers/clidownloads [github.com/openshift/console-operator/pkg/console/controllers/clidownloads.test]
pkg/console/controllers/clidownloads/controller_test.go:107:60: too many arguments in call to PlatformBasedOCConsoleCLIDownloads
have (string, string, string)
want (string, string)

Means you will have to fix func TestPlatformBasedOCConsoleCLIDownloads(t *testing.T) { ....}.
which exists in pkg/console/controllers/clidownloads/controller_test.go.

@benjaminapetersen
Copy link
Contributor

Opened #344 to add tests for our oc downloads. I'd like to see some test coverage merge first, then this PR can update.

@benjaminapetersen
Copy link
Contributor

/retest

timed out waiting for the condition
lots of timeouts, likely a flake.

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 13, 2019
@yselkowitz
Copy link
Contributor Author

Repushed with corresponding changes for the unit test.

@yselkowitz
Copy link
Contributor Author

/retest

1 similar comment
@yselkowitz
Copy link
Contributor Author

/retest

@benjaminapetersen
Copy link
Contributor

E2E merged:
#344
You can now update this and we should be good to move forward

@benjaminapetersen
Copy link
Contributor

/retest e2e-aws-operator

Expected e2e func to be broken.

@yselkowitz
Copy link
Contributor Author

/test e2e-gcp

@yselkowitz
Copy link
Contributor Author

/hold cancel
openshift/oc#153 has been merged

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 19, 2019
@yselkowitz
Copy link
Contributor Author

/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"},
Copy link
Member

@wking wking Nov 19, 2019

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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).

Copy link
Member

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 ;).

Copy link
Contributor Author

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.

Copy link
Member

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.

@yselkowitz
Copy link
Contributor Author

/test e2e-gcp

1 similar comment
@yselkowitz
Copy link
Contributor Author

/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.
@yselkowitz
Copy link
Contributor Author

/retest

@benjaminapetersen
Copy link
Contributor

/lgtm

I think we are good to go with this now.

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 20, 2019
@openshift-ci-robot
Copy link
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 20, 2019
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

3 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 04c4013 into openshift:master Nov 20, 2019
wking added a commit to wking/console-operator that referenced this pull request Nov 20, 2019
…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
wking added a commit to wking/console-operator that referenced this pull request Nov 20, 2019
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants