Skip to content

make workloadmanager build more explicit#264

Open
hzxuzhonghu wants to merge 4 commits intovolcano-sh:mainfrom
hzxuzhonghu:make
Open

make workloadmanager build more explicit#264
hzxuzhonghu wants to merge 4 commits intovolcano-sh:mainfrom
hzxuzhonghu:make

Conversation

@hzxuzhonghu
Copy link
Copy Markdown
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

  • make workloadmanager build more clear
  • remove running locally, because of port conflict

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Starting in Kubernetes v1.36, the DRAResourceClaimGranularStatusAuthorization
feature gate (beta, on-by-default) enforces fine-grained authorization checks
for ResourceClaim status updates. Schedulers that modify status.allocation or
status.reservedFor now require additional permissions on the
resourceclaims/binding synthetic subresource.

This adds the required RBAC rule for the agent scheduler. These permissions
are inert on Kubernetes versions prior to v1.36.

Ref: kubernetes/kubernetes#138149
Signed-off-by: Cairon <cairon-ab@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 9, 2026 09:41
@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 ask for approval from hzxuzhonghu. 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

Copy link
Copy Markdown
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 updates build/dev tooling so the WorkloadManager image build is called out explicitly, and removes local “run” Makefile targets (per the stated port-conflict concern), while aligning E2E and developer docs with the new workflow.

Changes:

  • Rename the WorkloadManager image build/push targets to docker-*-workloadmanager and update E2E script/docs to use them.
  • Simplify Kind image loading via make kind-load (now loads workloadmanager/router/picod) and remove kind-load-router.
  • Extend Volcano agent-scheduler (development) RBAC to allow updates/patches to resourceclaims/binding.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/e2e/run_e2e.sh Use make docker-build-workloadmanager during E2E image build step.
test/e2e/README.md Document updated E2E image build command set.
manifests/charts/base/templates/volcano-agent-scheduler-development.yaml Add RBAC rule for resourceclaims/binding updates/patches.
Makefile Rename WorkloadManager docker build/push targets; remove local run/install targets; make kind-load load all three images.
docs/agentcube/docs/developer-guide/local-development.md Update local dev instructions to the new image build/load commands and remove local “run” section.
docker/Dockerfile.workloadmanager No functional change (appears to be a no-op rewrite).

### Build Specific Components

- **Workload Manager**: `make build`
- **Workload Manager**: `make build-workloadmanager`
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

make build-workloadmanager is referenced here, but the Makefile only defines build (which builds the workloadmanager). Either update this doc to reference make build, or add a build-workloadmanager target/alias in the Makefile to match the documentation and the PR goal of making the build more explicit.

Suggested change
- **Workload Manager**: `make build-workloadmanager`
- **Workload Manager**: `make build`

Copilot uses AI. Check for mistakes.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 9, 2026

⚠️ 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 43.32%. Comparing base (845b798) to head (eabbe9e).
⚠️ Report is 163 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     #264      +/-   ##
==========================================
+ Coverage   35.60%   43.32%   +7.71%     
==========================================
  Files          29       30       +1     
  Lines        2533     2613      +80     
==========================================
+ Hits          902     1132     +230     
+ Misses       1505     1358     -147     
+ Partials      126      123       -3     
Flag Coverage Δ
unittests 43.32% <ø> (+7.71%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Copy Markdown
Contributor

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

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 refactors the Makefile to streamline build and Docker image management, including renaming docker-build targets for clarity and consolidating kind-load into a single command for all images. It also updates the volcano-agent-scheduler role with additional permissions for resourceclaims/binding. The documentation and e2e tests have been updated to reflect these Makefile changes. Feedback suggests re-introducing multi-architecture build targets without push for local development and adding a docker-build-all target to simplify building all Docker images.

Comment thread Makefile
docker-buildx:
@echo "Building multi-architecture Docker image..."
docker buildx build -f docker/Dockerfile --platform linux/amd64,linux/arm64 -t $(WORKLOAD_MANAGER_IMAGE) .
docker build -f docker/Dockerfile.workloadmanager -t $(WORKLOAD_MANAGER_IMAGE) .
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 docker-buildx, docker-buildx-router, and docker-buildx-picod targets for building multi-architecture images without pushing have been removed. This removes potentially useful functionality for developers who want to build and test multi-arch images locally without pushing to a registry. Please consider re-adding these targets with the new naming convention, for example:

# Multi-architecture build (supports amd64, arm64)
docker-buildx-workloadmanager:
	@echo "Building multi-architecture Docker image..."
	docker buildx build -f docker/Dockerfile.workloadmanager --platform linux/amd64,linux/arm64 -t $(WORKLOAD_MANAGER_IMAGE) .

Similar targets could be added for router and picod.

Comment thread Makefile
# Picod Docker targets
docker-build-picod:
@echo "Building Picod Docker image..."
docker build -f docker/Dockerfile.picod -t $(PICOD_IMAGE) .
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

To improve developer experience, consider adding a target to build all docker images at once, similar to build-all. This would complement the change I've suggested in docs/agentcube/docs/developer-guide/local-development.md. You could add this after the docker-build-picod target:

docker-build-all: docker-build-workloadmanager docker-build-router docker-build-picod ## Build all docker images

Comment on lines +47 to +49
make docker-build-workloadmanager
make docker-build-router
make docker-build-picod
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

It would be more convenient for users to build all Docker images with a single command. I've made a suggestion on the Makefile to add a docker-build-all target. If that is implemented, this documentation can be simplified.

Suggested change
make docker-build-workloadmanager
make docker-build-router
make docker-build-picod
make docker-build-all

Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
Comment thread Makefile Outdated
Comment thread Makefile Outdated
Co-authored-by: Zhou Zihang <mail@zzhgo.com>
Signed-off-by: Tiger Xu / Zhonghu Xu <xuzhonghu@huawei.com>
Copilot AI review requested due to automatic review settings April 14, 2026 03:01
Co-authored-by: Zhou Zihang <mail@zzhgo.com>
Signed-off-by: Tiger Xu / Zhonghu Xu <xuzhonghu@huawei.com>
Copy link
Copy Markdown
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

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

Comment thread Makefile
go run ./cmd/router/main.go \
--port=8080 \
--debug
build-all: build-workloadmanager build-agentd build-router
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

build-all still depends on the removed build target, so make build-all (and default make all) will fail. Update this dependency to build-workloadmanager (or reintroduce an alias target) to keep builds working.

Copilot uses AI. Check for mistakes.
Comment thread Makefile
@@ -68,7 +69,7 @@ gen-check: gen-all ## Check if generated code is up to date
.PHONY: build run clean test deps
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

The .PHONY declaration still lists build and run, but those targets no longer exist. This can be confusing for maintainers and makes it harder to reason about intended targets; update the .PHONY list to match the current target set.

Suggested change
.PHONY: build run clean test deps
.PHONY: clean test deps

Copilot uses AI. Check for mistakes.
Comment thread Makefile
Comment on lines 139 to 148
# Multi-architecture build and push
docker-buildx-push:
docker-buildx-push-workloadmanager:
@if [ -z "$(IMAGE_REGISTRY)" ]; then \
echo "Error: IMAGE_REGISTRY not set. Usage: make docker-buildx-push IMAGE_REGISTRY=your-registry.com"; \
echo "Error: IMAGE_REGISTRY not set. Usage: make docker-buildx-push-workloadmanager IMAGE_REGISTRY=your-registry.com"; \
exit 1; \
fi
@echo "Building and pushing multi-architecture Docker image to $(IMAGE_REGISTRY)/$(WORKLOAD_MANAGER_IMAGE)..."
docker buildx build -f docker/Dockerfile --platform linux/amd64,linux/arm64 \
docker buildx build -f docker/Dockerfile.workloadmanager --platform linux/amd64,linux/arm64 \
-t $(IMAGE_REGISTRY)/$(WORKLOAD_MANAGER_IMAGE) \
--push .
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

The workload manager multi-arch release target was renamed to docker-buildx-push-workloadmanager, but existing automation still invokes make docker-buildx-push (e.g., .github/workflows/build-push-release.yml). Without updating those callers (or keeping a backward-compatible alias), release image publishing will break.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants