Sitelet https://github.com/kubernetes/kops/pull/18102
Skip to content

Replace cwd with go:embed for storage.testdriver manifests - #18102

Merged
k8s-ci-robot merged 1 commit into
kubernetes:masterfrom
rifelpet:gcp-pd-e2e
Mar 20, 2026
Merged

k8s-ci-robot merged 1 commit into
kubernetes:masterfrom
rifelpet:gcp-pd-e2e

Conversation

@rifelpet

Copy link
Copy Markdown
Member

os.GetCwd() isn't sufficient for presubmits in both kops and other repos, where the working directory may be of the repo under test rather than kubetest2-kops.

Rather than building a path to the csi-manifests in the kops repo, we can just go:embed the manifests and save them to a temp file.


Example failure:

https://storage.googleapis.com/kubernetes-ci-logs/pr-logs/pull/cloud-provider-gcp/1007/pull-cloud-provider-gcp-scenario-kops-simple/2034736712390807552/build-log.txt

    I0319 21:15:30.385767 47495 external.go:194] Driver loaded from path [/home/prow/go/src/cloud-provider-gcp/tests/e2e/csi-manifests/gcp-pd/driver.yaml]: <nil>
  invalid value "/home/prow/go/src/cloud-provider-gcp/tests/e2e/csi-manifests/gcp-pd/driver.yaml" for flag -storage.testdriver: open /home/prow/go/src/cloud-provider-gcp/tests/e2e/csi-manifests/gcp-pd/driver.yaml: no such file or directory

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 20, 2026
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 20, 2026

@hakman hakman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Big fan of "embed", let's go with it.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 20, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 20, 2026
@k8s-ci-robot
k8s-ci-robot merged commit badb2ab into kubernetes:master Mar 20, 2026
27 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.36 milestone Mar 20, 2026
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

3 participants