-
Notifications
You must be signed in to change notification settings - Fork 193
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
OTA-1403: Create minimal openshift tests extension #1168
base: main
Are you sure you want to change the base?
OTA-1403: Create minimal openshift tests extension #1168
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DavidHurta 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 |
So that we can have multiple CLI applications in the `cmd` folder.
Create a minimal openshift-tests-extension CLI application, which has no tests. Verifying no tests are present: ```sh $ ./_output/linux/amd64/openshift-tests-extension list null ```
419162c
to
1ef5a94
Compare
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.
The movement of the files could be considered an overkill. I am interested in opinions and suggestions.
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 a fan actually - but would do it in a separate PR that does nothing else
Build a statically compiled openshift-tests-extension binary. Static compilation is done because [1]: > Extension binaries are extracted from container images into a > running Pod executing openshift-tests. Contributors do not > necessarily know which version of RHEL the openshift-tests > binary will be running on, so, for maximum portability, > test extension binaries should be statically compiled. The `GO_COMPLIANCE_POLICY="exempt_all"` is set because [1]: > For compliance reasons, when a binary is compiled by a golang > builder image supplied by ART, a wrapper around the go compiler > will force FIPS compliant compilation (e.g. dynamic linking). > For this reason, extension binaries should include > GO_COMPLIANCE_POLICY="exempt_all" in the environment when > compiling an extension binary. This will inhibit the wrapper from > modifying CGO_ENABLED or other compiler arguments required for > static compilation. Set `CGO_ENABLED=0` to disable the use of cgo. Verifying whether such a binary is built statically: ```sh $ ldd _output/linux/amd64/openshift-tests-extension not a dynamic executable ``` [1]: https://github.com/openshift/enhancements/blob/c2c0d43e3cd70cf79bc2b101ceb6a03c5e0114a8/enhancements/testing/openshift-tests-extension.md
Compress the openshift-tests-extension binary. Use `--force` to overwrite the output file if already present to speed up local development. Use `--keep` to keep the original binary after compressing it so that a developer may use it. Compressing because [1]: > Statically linked binaries are prohibited in FIPS and will > cause failures if detected by product pipeline scans. To > avoid this, extension binaries should be gzipped before > being committed to container images. Such a compressed binary can be then extracted as per [1]: > After discovering a test extension binary, the origin test framework will > extract the binary from the container image which carries it and store it > in /tmp storage of the pod in which it is running. > > If the binary-path ends in .gz, the binary will be decompressed. [1]: https://github.com/openshift/enhancements/blob/c2c0d43e3cd70cf79bc2b101ceb6a03c5e0114a8/enhancements/testing/openshift-tests-extension.md
1ef5a94
to
3fa9dbf
Compare
echo "Building ${REPO} openshift-tests-extension binary (${VERSION_OVERRIDE})" | ||
GO_COMPLIANCE_POLICY="exempt_all" CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} \ | ||
go build \ | ||
${GOFLAGS} \ | ||
-ldflags "${GLDFLAGS}" \ | ||
-o "${BIN_PATH}/openshift-tests-extension" \ | ||
"${REPO}/cmd/openshift-tests-extension/..." |
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 am not a skillful go builder. Suggestions and tips are welcomed.
/test images |
@DavidHurta: This pull request references OTA-1403 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. In response to this: 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 openshift-eng/jira-lifecycle-plugin repository. |
@DavidHurta: This pull request references OTA-1403 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
@DavidHurta: This pull request references OTA-1403 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
@DavidHurta: This pull request references OTA-1403 which is a valid jira issue. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
@DavidHurta: This pull request references OTA-1403 which is a valid jira issue. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
@DavidHurta: This pull request references OTA-1403 which is a valid jira issue. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
@DavidHurta: The following tests failed, say
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. |
/uncc wking petr-muller |
ci/prow/e2e-agnostic-ovn-upgrade-into-change failure not relevant to the PR:
|
"github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests" | ||
) | ||
|
||
func main() { |
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.
Based on the https://github.com/openshift-eng/openshift-tests-extension/blob/main/cmd/example-tests/main.go example extension
Create a minimal Cluster Version Operator OpenShift tests extension.
For more information regarding the extension, see openshift-eng/openshift-tests-extension repository or the respective enhancement.
This pull request references https://issues.redhat.com//browse/OTA-1403
Following PRs will:
update
to run_output/$OS/$ARCH/openshift-tests-extension update
verify
to verify no changes are present after theupdate
invocationverify
on presubmits