Skip to content

build: add developer convenience targets#383

Open
googs1025 wants to merge 1 commit into
volcano-sh:mainfrom
googs1025:add-makefile-dev-targets
Open

build: add developer convenience targets#383
googs1025 wants to merge 1 commit into
volcano-sh:mainfrom
googs1025:add-makefile-dev-targets

Conversation

@googs1025

Copy link
Copy Markdown
Member

What this PR does

  • Adds a local verify target for common pre-submit checks.
  • Adds test-coverage to mirror the GitHub coverage command.
  • Adds install-crds and uninstall-crds for local CRD validation workflows.
  • Adds helm-template and helm-lint for chart validation.
  • Includes the go mod tidy ordering change required by make gen-check.

Verification

  • make help
  • make -n install-crds uninstall-crds helm-template helm-lint verify test-coverage
  • make helm-template
  • make helm-lint
  • GOCACHE=/private/tmp/agentcube-go-cache make gen-check

Note: make test-coverage runs locally, but on macOS this repository currently fails in pkg/picod/TestSanitizePath because temporary paths normalize between /var and /private/var. The PR target matches the existing Ubuntu CI coverage command.

Copilot AI review requested due to automatic review settings June 11, 2026 03:12
@volcano-sh-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hzxuzhonghu for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds developer tooling targets to the Makefile for Kubernetes/Helm workflows and improved test reporting, plus a minor go.mod formatting/order adjustment.

Changes:

  • Add Makefile targets for installing/uninstalling CRDs, Helm lint/template, and a verify aggregate target.
  • Add a test-coverage target to run tests with race detection and coverage reporting.
  • Reorder/realign a dependency entry in go.mod.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
go.mod Minor dependency line reorder/formatting in require block.
Makefile Adds CRD install/remove, Helm helpers, coverage target, and a verify aggregate.

Comment thread Makefile Outdated
Comment on lines +51 to +52
install-crds: ## Install CRDs into the current Kubernetes cluster
kubectl apply -f manifests/charts/base/crds

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

Comment thread Makefile Outdated
Comment on lines +136 to +137
test-coverage: ## Run tests with race detector and coverage
go test -race -v -coverprofile=coverage.out -coverpkg=./pkg/... ./pkg/...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

Comment thread Makefile Outdated
$(GOLANGCI_LINT) run ./...

.PHONY: verify
verify: fmt vet lint test gen-check ## Run local verification before submitting PR

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several new Makefile targets (install-crds, uninstall-crds, test-coverage, verify, helm-template, and helm-lint) to streamline local development, testing, and verification. It also cleans up dependency sorting in go.mod. Feedback suggests adding gen-crd as a prerequisite to install-crds to ensure CRDs are up-to-date before installation, and restructuring the verify target to run sequentially using sub-make invocations to avoid race conditions during parallel execution.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread Makefile
Comment on lines +50 to +52
.PHONY: install-crds
install-crds: ## Install CRDs into the current Kubernetes cluster
kubectl apply -f manifests/charts/base/crds

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The install-crds target applies CRD manifests from manifests/charts/base/crds. If these manifests have not been generated yet or are outdated, kubectl apply will fail or install stale CRDs. Adding gen-crd as a prerequisite ensures the CRDs are always generated and up-to-date before installation.

.PHONY: install-crds
install-crds: gen-crd ## Install CRDs into the current Kubernetes cluster
	kubectl apply -f manifests/charts/base/crds

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

Comment thread Makefile Outdated
Comment on lines +154 to +155
.PHONY: verify
verify: fmt vet lint test gen-check ## Run local verification before submitting PR

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Running gen-check at the end of verify has two issues:

  1. If the generated code is out of date, fmt, vet, lint, and test will run on stale code first.
  2. If make is run with parallel execution (e.g., make -j verify), these targets will run concurrently. Since gen-check modifies files (via gen-all and go mod tidy) while lint, vet, and test are reading them, this will cause race conditions and flaky failures.

To ensure correctness and safety under parallel execution, we should run gen-check first and execute the verification steps sequentially using sub-make invocations.

.PHONY: verify
verify: ## Run local verification before submitting PR
	$(MAKE) gen-check
	$(MAKE) fmt
	$(MAKE) vet
	$(MAKE) lint
	$(MAKE) test

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

@codecov-commenter

codecov-commenter commented Jun 11, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.06%. Comparing base (524e55e) to head (d21f0dd).
⚠️ Report is 121 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #383       +/-   ##
===========================================
+ Coverage   47.57%   58.06%   +10.49%     
===========================================
  Files          30       34        +4     
  Lines        2819     3181      +362     
===========================================
+ Hits         1341     1847      +506     
+ Misses       1338     1150      -188     
- Partials      140      184       +44     
Flag Coverage Δ
unittests 58.06% <ø> (+10.49%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: CYJiang <googs1025@gmail.com>
@googs1025 googs1025 force-pushed the add-makefile-dev-targets branch from 870ceb2 to d21f0dd Compare June 11, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants