Skip to content

Preserve hack/test/kind/infra/operator directory#12175

Open
nelljerram wants to merge 1 commit intoprojectcalico:masterfrom
nelljerram:preserve-operator-dir
Open

Preserve hack/test/kind/infra/operator directory#12175
nelljerram wants to merge 1 commit intoprojectcalico:masterfrom
nelljerram:preserve-operator-dir

Conversation

@nelljerram
Copy link
Member

This directory is checked in but was being deleted by the clean target in node/Makefile:

rm -rf $(REPO_ROOT)/hack/test/kind/infra/operator

This might be the cause of the hashrelease build currently failing with

FATAL[0067]main.go:85 main.main() Error running app                             error="there are uncommitted changes in the repository, please commit or stash them before publishing the release"

I've reproduced a failing build with "sem debug" and then "git status" shows:

semaphore@semaphore-vm:~/calico/release$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	deleted:    ../hack/test/kind/infra/operator

no changes added to commit (use "git add" and/or "git commit -a")

So it looks like the immediate problem in the hashrelease build is hack/test/kind/infra/operator having been deleted. I don't know for sure if that is because of a make clean in node, but it seems like a good guess.

This directory is checked in but was being deleted by the clean target in node/Makefile:

    rm -rf $(REPO_ROOT)/hack/test/kind/infra/operator

This might be the cause of the hashrelease build currently failing with

    FATAL[0067]main.go:85 main.main() Error running app                             error="there are uncommitted changes in the repository, please commit or stash them before publishing the release"

I've reproduced a failing build with "sem debug" and then "git status" shows:

    semaphore@semaphore-vm:~/calico/release$ git status
    On branch master
    Your branch is up to date with 'origin/master'.

    Changes not staged for commit:
      (use "git add/rm <file>..." to update what will be committed)
      (use "git restore <file>..." to discard changes in working directory)
    	deleted:    ../hack/test/kind/infra/operator

    no changes added to commit (use "git add" and/or "git commit -a")

So it looks like the immediate problem in the hashrelease build is hack/test/kind/infra/operator
having been deleted.  I don't know for sure if that is because of a make clean in node, but it seems
like a good guess.
@nelljerram nelljerram requested a review from a team as a code owner March 18, 2026 10:13
Copilot AI review requested due to automatic review settings March 18, 2026 10:13
@marvin-tigera marvin-tigera added this to the Calico v3.32.0 milestone Mar 18, 2026
@marvin-tigera marvin-tigera added release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Mar 18, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the node/Makefile clean target to ensure hack/test/kind/infra/operator exists after make clean, aiming to prevent release/hashrelease builds from seeing a dirty git working tree due to that path being removed.

Changes:

  • After removing $(REPO_ROOT)/hack/test/kind/infra/operator during make clean, recreate the directory.

rm -rf $(BUILD_DEPS)
rm -rf filesystem/included-source
rm -rf $(REPO_ROOT)/hack/test/kind/infra/operator
mkdir $(REPO_ROOT)/hack/test/kind/infra/operator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-pr-required Change is not yet documented release-note-required Change has user-facing impact (no matter how small)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants