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

TRT-1895: External binary caching and code clean-up #29300

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

stbenjam
Copy link
Member

@stbenjam stbenjam commented Nov 15, 2024

Adds a caching layer for external binary extraction so it's easier to re-run openshift-tests locally. There's a README with additional info in pkg/test/externalbinary/README.md.

This also reduces the complexity of cmd_runsuite, and encapsulates all image extraction code, so it can be used elsewhere more easily.

It does not yet move to the new interface with openshift-tests-extension, but makes it easier to do that later. This PR was already large enough by itself.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 15, 2024
Copy link
Contributor

openshift-ci bot commented Nov 15, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@stbenjam
Copy link
Member Author

See how much I broke

/test e2e-aws-ovn

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 15, 2024
@stbenjam stbenjam force-pushed the extbin branch 8 times, most recently from 2f3270f to 5cbffd7 Compare November 18, 2024 19:05
@stbenjam
Copy link
Member Author

/test e2e-aws-ovn

@stbenjam stbenjam changed the title [WIP] Image caching and external binary cleanup External binary caching and code clean-up Nov 18, 2024
@stbenjam stbenjam marked this pull request as ready for review November 18, 2024 21:15
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 18, 2024

// Use a fixed cache or tmp directory for storing binaries
tmpDir := ""
binDir := pullSpecToDirName(releaseImage)
Copy link
Contributor

Choose a reason for hiding this comment

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

Depending on how far you want to take this, it would be more efficient to create a cache directory based on the sha256 digest of the image the binary is coming from instead of considering the payload. This would allow you to safely share the binary extracted from payload A with payload B if the component image hasn't changed between them.

Copy link
Member Author

@stbenjam stbenjam Nov 19, 2024

Choose a reason for hiding this comment

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

I had thought of that but I wasn't sure if we always guarantee a release payload uses the image digest, instead of a tag pullspec. Is that true? I can always assume it'll be @sha256:<hash>, like the below?

      {
        "name": "vsphere-csi-driver-syncer",
        "annotations": {
          "io.openshift.build.commit.id": "03b7e8ebf2c6347b40a340d892e1a66d47806300",
          "io.openshift.build.commit.ref": "",
          "io.openshift.build.source-location": "https://github.com/openshift/vmware-vsphere-csi-driver"
        },
        "from": {
          "kind": "DockerImage",
          "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d9c0515f4069cc18ce58fe200fb5eee73b703fba611c2b3892929e8f2754121d"
        },
        "generation": null,
        "importPolicy": {},
        "referencePolicy": {
          "type": ""
        }
      },

@jupierce
Copy link
Contributor

holding in case there is interest in the cache dir alternative.
/lgtm
/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 19, 2024
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 19, 2024
Copy link
Contributor

openshift-ci bot commented Nov 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jupierce, stbenjam

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

@stbenjam
Copy link
Member Author

/payload 4.18 nightly blocking

Copy link
Contributor

openshift-ci bot commented Nov 19, 2024

@stbenjam: trigger 14 job(s) of type blocking for the nightly release of OCP 4.18

  • periodic-ci-openshift-release-master-ci-4.18-e2e-aws-upgrade-ovn-single-node
  • periodic-ci-openshift-release-master-ci-4.18-e2e-aws-ovn-upgrade
  • periodic-ci-openshift-release-master-ci-4.18-e2e-azure-ovn-upgrade
  • periodic-ci-openshift-release-master-ci-4.18-upgrade-from-stable-4.17-e2e-gcp-ovn-rt-upgrade
  • periodic-ci-openshift-hypershift-release-4.18-periodics-e2e-aws-ovn-conformance
  • periodic-ci-openshift-release-master-nightly-4.18-e2e-aws-ovn-serial
  • periodic-ci-openshift-release-master-ci-4.18-e2e-aws-ovn-techpreview
  • periodic-ci-openshift-release-master-ci-4.18-e2e-aws-ovn-techpreview-serial
  • periodic-ci-openshift-release-master-ci-4.18-e2e-aws-ovn-upgrade
  • periodic-ci-openshift-release-master-nightly-4.18-fips-payload-scan
  • periodic-ci-openshift-release-master-nightly-4.18-e2e-metal-ipi-ovn-bm
  • periodic-ci-openshift-release-master-nightly-4.18-e2e-metal-ipi-ovn-ipv6
  • periodic-ci-openshift-microshift-release-4.18-periodics-e2e-aws-ovn-ocp-conformance
  • periodic-ci-openshift-microshift-release-4.18-periodics-e2e-aws-ovn-ocp-conformance-serial

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/1502db70-a6cd-11ef-9171-b582f25d8074-0

@stbenjam
Copy link
Member Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 25, 2024
@stbenjam stbenjam changed the title External binary caching and code clean-up TRT-1895: External binary caching and code clean-up Nov 25, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 25, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 25, 2024

@stbenjam: This pull request references TRT-1895 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:

Adds a caching layer for external binary extraction so it's easier to re-run openshift-tests locally. There's a README with additional info in pkg/test/externalbinary/README.md.

This also reduces the complexity of cmd_runsuite, and encapsulates all image extraction code, so it can be used elsewhere more easily.

It does not yet move to the new interface with openshift-tests-extension, but makes it easier to do that later. This PR was already large enough by itself.

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.

@stbenjam
Copy link
Member Author

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Nov 25, 2024
@stbenjam
Copy link
Member Author

/hold

Going to give it a couple of days post-branching

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 25, 2024
@stbenjam
Copy link
Member Author

stbenjam commented Dec 2, 2024

/hold cancel
/retest-required

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 2, 2024
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 3020953 and 2 for PR HEAD 6a12774 in total

Copy link
Contributor

openshift-ci bot commented Dec 2, 2024

@stbenjam: The following tests 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/e2e-aws-ovn-single-node-upgrade 6a12774 link false /test e2e-aws-ovn-single-node-upgrade
ci/prow/e2e-aws-ovn-kube-apiserver-rollout 6a12774 link false /test e2e-aws-ovn-kube-apiserver-rollout
ci/prow/e2e-metal-ipi-ovn-kube-apiserver-rollout 6a12774 link false /test e2e-metal-ipi-ovn-kube-apiserver-rollout
ci/prow/e2e-aws-ovn-cgroupsv2 6a12774 link false /test e2e-aws-ovn-cgroupsv2
ci/prow/e2e-aws-ovn-single-node-serial 6a12774 link false /test e2e-aws-ovn-single-node-serial
ci/prow/e2e-agnostic-ovn-cmd 6a12774 link false /test e2e-agnostic-ovn-cmd

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

openshift-trt bot commented Dec 2, 2024

Job Failure Risk Analysis for sha: 6a12774

Job Name Failure Risk
pull-ci-openshift-origin-master-e2e-aws-ovn-serial IncompleteTests
Tests for this run (17) are below the historical average (1146): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD e075d0e and 1 for PR HEAD 6a12774 in total

@openshift-merge-bot openshift-merge-bot bot merged commit cef11fd into openshift:master Dec 3, 2024
22 of 28 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: openshift-enterprise-tests
This PR has been included in build openshift-enterprise-tests-container-v4.19.0-202412031309.p0.gcef11fd.assembly.stream.el9.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. 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.

4 participants