Skip to content

Copilot skills for building CLI, container images, and installing Radius#11402

Open
sk593 wants to merge 3 commits intomainfrom
add-build-skills
Open

Copilot skills for building CLI, container images, and installing Radius#11402
sk593 wants to merge 3 commits intomainfrom
add-build-skills

Conversation

@sk593
Copy link
Contributor

@sk593 sk593 commented Mar 9, 2026

Description

Adds three new GitHub Copilot skills to help developers build and deploy Radius from source, and updates .github/copilot-instructions.md to register them.

New skills added:

  • .github/skills/radius-build-cli/SKILL.md — Step-by-step procedure for building the rad CLI binary using make build-rad, including cross-compilation and debug build variants.
  • .github/skills/radius-build-images/SKILL.md — Procedure for building and pushing Radius Docker images to a registry, including multi-arch builds and registry authentication guidance.
  • .github/skills/radius-install-custom/SKILL.md — Procedure for installing Radius on Kubernetes from custom-built images, including private registry auth, reinstall, and troubleshooting.

Type of change

  • This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional).

Contributor checklist

Please verify that the PR meets the following requirements, where applicable:

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Yes
    • Not applicable
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
    • Yes
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Yes
    • Not applicable
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Yes
    • Not applicable
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.
    • Yes
    • Not applicable

Copilot AI review requested due to automatic review settings March 9, 2026 21:26
@sk593 sk593 requested review from a team as code owners March 9, 2026 21:26
@sk593 sk593 requested a deployment to external-contributor-approval March 9, 2026 21:26 — with GitHub Actions Waiting
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 adds new GitHub Copilot skills that document how to build the rad CLI, build/push Radius container images, and install Radius from custom images. It also introduces new DynamicRP schema-annotation helpers and a frontend update filter intended to interact with sensitive-field schema metadata.

Changes:

  • Add 3 new Copilot skills under .github/skills/ and register them in .github/copilot-instructions.md.
  • Add GetSensitiveFieldPaths / ExtractSensitiveFieldPaths implementation + tests under pkg/dynamicrp/schema/.
  • Add a new DynamicRP frontend update filter factory + tests under pkg/dynamicrp/frontend/.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
pkg/dynamicrp/schema/annotations.go New schema annotation helper implementation for sensitive-field paths
pkg/dynamicrp/schema/annotations_test.go Unit tests for the new DynamicRP schema helper
pkg/dynamicrp/frontend/updatefilter.go New frontend update filter factory that fetches sensitive-field paths
pkg/dynamicrp/frontend/updatefilter_test.go Tests covering the new update filter behavior
.github/skills/radius-build-cli/SKILL.md New skill: build rad from source
.github/skills/radius-build-images/SKILL.md New skill: build/push Radius images (incl. multi-arch)
.github/skills/radius-install-custom/SKILL.md New skill: install Radius using custom-built images
.github/copilot-instructions.md Registers the newly added skills

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +191 to +197
## Key Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| `DOCKER_REGISTRY` | `$(whoami)` | Target registry (e.g. `ghcr.io/myorg`) |
| `DOCKER_TAG_VERSION` | `latest` | Image tag |
| `DOCKER_CACHE_GHA` | `0` | Set to `1` to enable GitHub Actions layer caching |
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

The "Key Environment Variables" table lists DOCKER_REGISTRY defaulting to $(whoami), but the repository Makefile includes build/test.mk before build/docker.mk, and build/test.mk sets DOCKER_REGISTRY ?= ghcr.io/radius-project/dev — which becomes the effective default. Update the table (or call out the include-order behavior) so the documented default matches what make docker-build/docker-push will actually use when the user doesn’t export DOCKER_REGISTRY.

Copilot uses AI. Check for mistakes.
Comment on lines +163 to +167
kubectl create secret docker-registry regcred \
--docker-server=${DOCKER_REGISTRY} \
--docker-username=<username> \
--docker-password=<password> \
-n radius-system
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

This example uses the --docker-password flag, which causes the registry password to appear in shell history, process listings, and potentially CI logs, making it easier for an attacker with host or log access to steal credentials and compromise the registry. Prefer approaches that do not place secrets directly on the command line (for example using --docker-password-stdin or other mechanisms supported by your tooling) so that passwords are not recorded in plaintext.

Copilot uses AI. Check for mistakes.
Comment on lines +110 to +114
kubectl create secret docker-registry regcred \
--docker-server=${DOCKER_REGISTRY} \
--docker-username=<username> \
--docker-password=<password> \
-n radius-system
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

This command passes the registry password via the --docker-password flag, which can expose credentials in shell history, process listings, and CI logs where the command line is captured. An attacker with access to these logs or the host could recover registry credentials and push or pull malicious images. Use a safer method such as --docker-password-stdin or an identity-based mechanism so the password is never present directly on the command line.

Copilot uses AI. Check for mistakes.
@sk593 sk593 force-pushed the add-build-skills branch from 02975a9 to 1a19350 Compare March 9, 2026 21:31
@sk593 sk593 requested a deployment to external-contributor-approval March 9, 2026 21:31 — with GitHub Actions Waiting
Copy link
Member

@brooke-hamilton brooke-hamilton left a comment

Choose a reason for hiding this comment

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

  1. **DOCKER_REGISTRY default
  2. --set-string is not a registered flag on rad install kubernetes

brooke-hamilton

This comment was marked as duplicate.

@sk593 sk593 requested a deployment to external-contributor-approval March 10, 2026 23:14 — with GitHub Actions Waiting
sk593 added 3 commits March 10, 2026 16:15
Signed-off-by: sk593 <shruthikumar@microsoft.com>
Signed-off-by: sk593 <shruthikumar@microsoft.com>
Signed-off-by: sk593 <shruthikumar@microsoft.com>
@sk593 sk593 force-pushed the add-build-skills branch from b99f247 to 3ca0542 Compare March 10, 2026 23:16
@sk593 sk593 deployed to external-contributor-approval March 10, 2026 23:16 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants