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

ensure we can remove _output #117510

Merged
merged 1 commit into from Apr 21, 2023
Merged

Conversation

BenTheElder
Copy link
Member

@BenTheElder BenTheElder commented Apr 21, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fixes make clean, which currently fails, if you run something like make test GOFLAGS="-v -failfast -count=1" KUBE_COVER="y" WHAT=./pkg/kubelet/kuberuntime (debugging #117362) then afterwards make clean will fail on:

+++ [0420 17:03:25] Removing _output directory
rm: /Users/bentheelder/go/src/k8s.io/kubernetes/_output/local/go/cache/mod/go.uber.org/automaxprocs@v1.5.2/.build/check_license.sh: Permission denied

AFAICT this issue does not exist on release-1.26 @ 67c667c or release-1.27 @ 523dd02 but it does at HEAD, I think this is related to #117016 which added a go install to golang::setup_env.

#117273 may also be related or is at least a similar problem, need to follow up on that separately.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Since this was introduced since 1.27 and has not been released yet, no release note. I don't see this issue on release-1.27 @ 523dd02, and #117016 is so far only in 1.28.

If we cherry-pick #117016 we'll need to pick this as well.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 21, 2023
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 21, 2023
@BenTheElder
Copy link
Member Author

/sig testing
/priority important-soon
/triage accepted

@k8s-ci-robot k8s-ci-robot added sig/testing Categorizes an issue or PR as relevant to SIG Testing. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 21, 2023
@@ -367,6 +367,8 @@ function kube::build::clean() {

if [[ -d "${LOCAL_OUTPUT_ROOT}" ]]; then
kube::log::status "Removing _output directory"
# this ensures we can clean _output/local/go/cache which is not rw by default
Copy link
Member Author

Choose a reason for hiding this comment

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

This is because we go install in module mode with GOPATH under _output, creating these non-writeable module cache files. We could make make clean aware of the go module path but ... that's a bit messy.

I think it generically makes sense to ensure the directory is recursively writeable before trying to remove it.

Copy link
Member

Choose a reason for hiding this comment

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

interesting!!

@dims
Copy link
Member

dims commented Apr 21, 2023

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 21, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 32ec90e5a28c5990266cf6f42d16b2a990698ac4

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder, dims

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

@k8s-ci-robot k8s-ci-robot merged commit 76a94fd into kubernetes:master Apr 21, 2023
13 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Apr 21, 2023
@BenTheElder BenTheElder deleted the clean-fun branch April 21, 2023 05:41
@aojea
Copy link
Member

aojea commented Apr 21, 2023

oh, great, I was surprised why I had to use sudo and it was because of this

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. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants