Skip to content
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

MULTIARCH-3440: refine multiarch support for test-unit and test-e2e using dockerfile and add ppc64le build to Makefile #624

Merged
merged 6 commits into from
Jun 8, 2023

Conversation

prb112
Copy link
Contributor

@prb112 prb112 commented Apr 28, 2023

Description

This PR enables multiarch support in the build and tests in this case ppc64le.

  • Update the .goreleaser.yaml to include ppc64le
  • Update the Dockerfile to include wget and pigz dependency
  • Update the Dockerfile to consider arch it's built on
  • Update the util.sh to be arch agnostic
  • Update the cross build for ppc64le

Note, the PR #1680 builds go-containerregistry for ppc64le. When a new release is cut for the go-containerregistry, this build will not be necessary.

opm requires a Power9 machine to run.

Fixes # MULTIARCH-3440

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • test-unit is run successfully
# podman run --rm -v .:/build:z local/go-toolset test-unit
Makefile:53: warning: overriding recipe for target 'test-unit'
vendor/github.com/openshift/build-machinery-go/make/targets/golang/test-unit.mk:7: warning: ignoring old recipe for target 'test-unit'
go test -tags "json1 btrfs_noversion exclude_graphdriver_btrfs libdm_no_deferred_remove exclude_graphdriver_devicemapper " -coverprofile=coverage.out -race -count=1 ./pkg/...
ok      github.com/openshift/oc-mirror/pkg/api/v1alpha1 0.012s
ok      github.com/openshift/oc-mirror/pkg/api/v1alpha2 0.012s
ok      github.com/openshift/oc-mirror/pkg/archive      0.025s
ok      github.com/openshift/oc-mirror/pkg/bundle       0.011s
ok      github.com/openshift/oc-mirror/pkg/cincinnati   0.011s
?       github.com/openshift/oc-mirror/pkg/cli  [no test files]
ok      github.com/openshift/oc-mirror/pkg/cli/mirror   0.028s
ok      github.com/openshift/oc-mirror/pkg/cli/mirror/describe  0.041s
ok      github.com/openshift/oc-mirror/pkg/cli/mirror/initcmd   0.011s
ok      github.com/openshift/oc-mirror/pkg/cli/mirror/list      0.015s
ok      github.com/openshift/oc-mirror/pkg/cli/mirror/version   0.011s
ok      github.com/openshift/oc-mirror/pkg/config       0.014s
ok      github.com/openshift/oc-mirror/pkg/image        0.023s
ok      github.com/openshift/oc-mirror/pkg/image/builder        0.011s
ok      github.com/openshift/oc-mirror/pkg/metadata     0.012s
ok      github.com/openshift/oc-mirror/pkg/metadata/storage     0.011s
ok      github.com/openshift/oc-mirror/pkg/operator     0.012s
ok      github.com/openshift/oc-mirror/pkg/operator/diff        0.011s
ok      github.com/openshift/oc-mirror/pkg/operator/diff/internal       0.011s
?       github.com/openshift/oc-mirror/pkg/version      [no test files]

# echo $?
0
  • test-e2e runs on ppc64le successfully.

Test Configuration:

  • Firmware version: Power9
  • Hardware: PowerVS Centos8 machine
  • Toolchain: Makefile, Podman
  • SDK: n/a

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 28, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 28, 2023

@prb112: This pull request references MULTIARCH-3440 which is a valid jira issue.

In response to this:

Description

This PR enables multiarch support in the build and tests in this case ppc64le.

  • Update the .goreleaser.yaml to include ppc64le
  • Update the Dockerfile to include wget and pigz dependency
  • Update the Dockerfile to consider arch it's built on
  • Update the util.sh to be arch agnostic
  • Update the cross build for ppc64le

Note, the PR #1680 builds go-containerregistry for ppc64le. When a new release is cut for the go-containerregistry, this build will not be necessary.

opm requires a Power9 machine to run.

Fixes # MULTIARCH-3440

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • test-unit is run successfully
# podman run --rm -v .:/build:z local/go-toolset test-unit
Makefile:53: warning: overriding recipe for target 'test-unit'
vendor/github.com/openshift/build-machinery-go/make/targets/golang/test-unit.mk:7: warning: ignoring old recipe for target 'test-unit'
go test -tags "json1 btrfs_noversion exclude_graphdriver_btrfs libdm_no_deferred_remove exclude_graphdriver_devicemapper " -coverprofile=coverage.out -race -count=1 ./pkg/...
ok      github.com/openshift/oc-mirror/pkg/api/v1alpha1 0.012s
ok      github.com/openshift/oc-mirror/pkg/api/v1alpha2 0.012s
ok      github.com/openshift/oc-mirror/pkg/archive      0.025s
ok      github.com/openshift/oc-mirror/pkg/bundle       0.011s
ok      github.com/openshift/oc-mirror/pkg/cincinnati   0.011s
?       github.com/openshift/oc-mirror/pkg/cli  [no test files]
ok      github.com/openshift/oc-mirror/pkg/cli/mirror   0.028s
ok      github.com/openshift/oc-mirror/pkg/cli/mirror/describe  0.041s
ok      github.com/openshift/oc-mirror/pkg/cli/mirror/initcmd   0.011s
ok      github.com/openshift/oc-mirror/pkg/cli/mirror/list      0.015s
ok      github.com/openshift/oc-mirror/pkg/cli/mirror/version   0.011s
ok      github.com/openshift/oc-mirror/pkg/config       0.014s
ok      github.com/openshift/oc-mirror/pkg/image        0.023s
ok      github.com/openshift/oc-mirror/pkg/image/builder        0.011s
ok      github.com/openshift/oc-mirror/pkg/metadata     0.012s
ok      github.com/openshift/oc-mirror/pkg/metadata/storage     0.011s
ok      github.com/openshift/oc-mirror/pkg/operator     0.012s
ok      github.com/openshift/oc-mirror/pkg/operator/diff        0.011s
ok      github.com/openshift/oc-mirror/pkg/operator/diff/internal       0.011s
?       github.com/openshift/oc-mirror/pkg/version      [no test files]

# echo $?
0
  • test-e2e runs on ppc64le successfully.

Test Configuration:

  • Firmware version: Power9
  • Hardware: PowerVS Centos8 machine
  • Toolchain: Makefile, Podman
  • SDK: n/a

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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.

1 similar comment
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 28, 2023

@prb112: This pull request references MULTIARCH-3440 which is a valid jira issue.

In response to this:

Description

This PR enables multiarch support in the build and tests in this case ppc64le.

  • Update the .goreleaser.yaml to include ppc64le
  • Update the Dockerfile to include wget and pigz dependency
  • Update the Dockerfile to consider arch it's built on
  • Update the util.sh to be arch agnostic
  • Update the cross build for ppc64le

Note, the PR #1680 builds go-containerregistry for ppc64le. When a new release is cut for the go-containerregistry, this build will not be necessary.

opm requires a Power9 machine to run.

Fixes # MULTIARCH-3440

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • test-unit is run successfully
# podman run --rm -v .:/build:z local/go-toolset test-unit
Makefile:53: warning: overriding recipe for target 'test-unit'
vendor/github.com/openshift/build-machinery-go/make/targets/golang/test-unit.mk:7: warning: ignoring old recipe for target 'test-unit'
go test -tags "json1 btrfs_noversion exclude_graphdriver_btrfs libdm_no_deferred_remove exclude_graphdriver_devicemapper " -coverprofile=coverage.out -race -count=1 ./pkg/...
ok      github.com/openshift/oc-mirror/pkg/api/v1alpha1 0.012s
ok      github.com/openshift/oc-mirror/pkg/api/v1alpha2 0.012s
ok      github.com/openshift/oc-mirror/pkg/archive      0.025s
ok      github.com/openshift/oc-mirror/pkg/bundle       0.011s
ok      github.com/openshift/oc-mirror/pkg/cincinnati   0.011s
?       github.com/openshift/oc-mirror/pkg/cli  [no test files]
ok      github.com/openshift/oc-mirror/pkg/cli/mirror   0.028s
ok      github.com/openshift/oc-mirror/pkg/cli/mirror/describe  0.041s
ok      github.com/openshift/oc-mirror/pkg/cli/mirror/initcmd   0.011s
ok      github.com/openshift/oc-mirror/pkg/cli/mirror/list      0.015s
ok      github.com/openshift/oc-mirror/pkg/cli/mirror/version   0.011s
ok      github.com/openshift/oc-mirror/pkg/config       0.014s
ok      github.com/openshift/oc-mirror/pkg/image        0.023s
ok      github.com/openshift/oc-mirror/pkg/image/builder        0.011s
ok      github.com/openshift/oc-mirror/pkg/metadata     0.012s
ok      github.com/openshift/oc-mirror/pkg/metadata/storage     0.011s
ok      github.com/openshift/oc-mirror/pkg/operator     0.012s
ok      github.com/openshift/oc-mirror/pkg/operator/diff        0.011s
ok      github.com/openshift/oc-mirror/pkg/operator/diff/internal       0.011s
?       github.com/openshift/oc-mirror/pkg/version      [no test files]

# echo $?
0
  • test-e2e runs on ppc64le successfully.

Test Configuration:

  • Firmware version: Power9
  • Hardware: PowerVS Centos8 machine
  • Toolchain: Makefile, Podman
  • SDK: n/a

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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.

Makefile Outdated Show resolved Hide resolved
@lmzuccarelli
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels May 23, 2023
prb112 and others added 4 commits May 24, 2023 14:56
…sing dockerfile and add ppc64le build to Makefile

- Update the .goreleaser.yaml to include ppc64le
- Update the Dockerfile to include wget and pigz dependency
- Update the Dockerfile to consider arch it's built on
- Update the util.sh to be arch agnostic
- Update the cross build for ppc64le

Signed-off-by: Paul Bastide <pbastide@redhat.com>
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

Co-authored-by: Jan Schintag <43986265+jschintag@users.noreply.github.com>
- Update the .goreleaser.yaml to include s390x
- Update the cross build for s390x
- Link gcc to s390x-linux-gnu-gcc binary

On s390x go compiler seems to expect the gcc binary at
s390x-linux-gnu-gcc binary. However on rhel it is not installed there.

Signed-off-by: Jan Schintag <jan.schintag@de.ibm.com>
- Update the .goreleaser.yaml to include s390x
- Update the cross build for s390x
- Link gcc to s390x-linux-gnu-gcc binary

On s390x go compiler seems to expect the gcc binary at
s390x-linux-gnu-gcc binary. However on rhel it is not installed there.

Signed-off-by: Jan Schintag <jan.schintag@de.ibm.com>
@lmzuccarelli
Copy link
Contributor

/retest

@lmzuccarelli
Copy link
Contributor

lmzuccarelli commented May 25, 2023

@prb112 - could you have a look at the e2e test - its failing here Error: pulling x86_64/registry:2: GET https://index.docker.io/v2/x86_64/registry/manifests/2: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:x86_64/registry Type:repository]]

use make test-e2e on your local env to verify

@prb112
Copy link
Contributor Author

prb112 commented May 25, 2023

@lmzuccarelli yes - doing so... I moved some scripts around and left the e2e running last night.

@lmzuccarelli
Copy link
Contributor

@prb112 - thanks again for the update. Let us know when we can review and finally merge

@prb112
Copy link
Contributor Author

prb112 commented May 25, 2023

Will do - I am testing on ppc now

@prb112 prb112 force-pushed the MULTIARCH-3440a branch 6 times, most recently from ed1bfbc to ae964e8 Compare May 26, 2023 01:18
…rches and add arm64

Signed-off-by: Paul Bastide <pbastide@redhat.com>
@prb112
Copy link
Contributor Author

prb112 commented May 26, 2023

Hey @lmzuccarelli - I've sent details on the changes in an email. It reflects our conversations and the testing is complete with s390x, ppc64le and amd64. thanks, Paul

Copy link
Contributor

@sherine-k sherine-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
Thanks for this PR @prb112 @jschintag and @dorzel
I left a small comment on the Makefile, in case a cross build for arm is needed

Makefile Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 31, 2023
@lmzuccarelli
Copy link
Contributor

lmzuccarelli commented May 31, 2023

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 31, 2023
Signed-off-by: Paul Bastide <pbastide@redhat.com>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 2, 2023
@prb112
Copy link
Contributor Author

prb112 commented Jun 2, 2023

Hi @lmzuccarelli per a request from @dorzel and @sherine-k I've added a cross-build for arm64. Please review at your convenience / review for LGTM. Take care, Paul

Copy link
Contributor

@sherine-k sherine-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much!
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 5, 2023
@openshift-ci
Copy link

openshift-ci bot commented Jun 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lmzuccarelli, prb112, sherine-k

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [lmzuccarelli,sherine-k]

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

@dgoodwin
Copy link

dgoodwin commented Jun 8, 2023

/payload-job periodic-ci-openshift-hypershift-release-4.14-periodics-e2e-aws-ovn

@openshift-ci
Copy link

openshift-ci bot commented Jun 8, 2023

@dgoodwin: trigger 0 job(s) for the /payload-(job|aggregate) command

@dgoodwin
Copy link

dgoodwin commented Jun 8, 2023

/label jira/valid-bug

@openshift-ci openshift-ci bot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Jun 8, 2023
@openshift-ci
Copy link

openshift-ci bot commented Jun 8, 2023

@prb112: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 063e0bb into openshift:main Jun 8, 2023
5 checks passed
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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants