Skip to content

fix: Verify Builds Cross-Compiled Binaries #1206

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

Merged

Conversation

adambkaplan
Copy link
Contributor

Update the verify Makefile target to build cross-compiled binaries. This ensures the s2i CLI can be released across all supported platforms at all times. Prevents future regressions of #1204.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 16, 2025
@adambkaplan
Copy link
Contributor Author

This PR's verify check should fail until it is rebased on top of #1205

@adambkaplan
Copy link
Contributor Author

🎉 verify test failed, as expected!

INFO[2025-01-16T16:09:17Z] Logs for container test in pod verify:       
INFO[2025-01-16T16:09:17Z] # github.com/Microsoft/hcsshim/internal/oc
vendor/github.com/Microsoft/hcsshim/internal/oc/errors.go:[21](https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_source-to-image/1206/pull-ci-openshift-source-to-image-master-verify/1879920172215570432#1:build-log.txt%3A21):39: undefined: errdefs.ToGRPC
!!! Error in hack/../hack/common.sh:97
  'CGO_ENABLED=0 go install "${goflags[@]:+${goflags[@]}}" -pkgdir "${S2I_OUTPUT_PKGDIR}" -ldflags "${version_ldflags} ${RELEASE_LDFLAGS}" -mod vendor "${binaries[@]}"' exited with status 1
Call stack:
  1: hack/../hack/common.sh:97 s2i::build::build_binaries(...)
  2: hack/build-cross.sh:17 main(...)
Exiting with status 1
!!! Error in hack/../hack/common.sh:104
  '( s2i::build::setup_env; local version_ldflags; version_ldflags=$(s2i::build::ldflags); s2i::build::export_targets "$@"; local platform; for platform in "${platforms[@]}";
do
    s2i::build::set_platform_envs "${platform}"; echo "++ Building go targets for ${platform}:" "${targets[@]}"; CGO_ENABLED=0 go install "${goflags[@]:+${goflags[@]}}" -pkgdir "${S2I_OUTPUT_PKGDIR}" -ldflags "${version_ldflags} ${RELEASE_LDFLAGS}" -mod vendor "${binaries[@]}"; s2i::build::unset_platform_envs "${platform}";
done )' exited with status 1
Call stack:
  1: hack/../hack/common.sh:104 s2i::build::build_binaries(...)
  2: hack/build-cross.sh:17 main(...)
Exiting with status 1
make: *** [Makefile:35: build-cross] Error 1
{"component":"entrypoint","error":"wrapped process failed: exit status 2","file":"sigs.k8s.io/prow/pkg/entrypoint/run.go:84","func":"sigs.k8s.io/prow/pkg/entrypoint.Options.internalRun","level":"error","msg":"Error executing test process","severity":"error","time":"2025-01-16T16:09:16Z"} 
INFO[2025-01-16T16:09:17Z] Ran for 14m[24](https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_source-to-image/1206/pull-ci-openshift-source-to-image-master-verify/1879920172215570432#1:build-log.txt%3A24)s

Update the `verify` Makefile target to build cross-compiled binaries.
This ensures the s2i CLI can be released across all supported platforms
at all times. Prevents future regressions of openshift#1204.

Signed-off-by: Adam Kaplan <[email protected]>
Copy link
Contributor

openshift-ci bot commented Jan 16, 2025

@adambkaplan: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/security 658e409 link false /test security

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

Copy link
Member

@avinal avinal left a comment

Choose a reason for hiding this comment

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

Looks good to me

@avinal
Copy link
Member

avinal commented Jan 17, 2025

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 17, 2025
Copy link
Contributor

openshift-ci bot commented Jan 17, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adambkaplan, avinal

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:

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

@openshift-merge-bot openshift-merge-bot bot merged commit fc4f542 into openshift:master Jan 17, 2025
6 of 7 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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants