fix: rename template file - #9155
Conversation
Windows Unit Test Results 3 files 12 suites 51s ⏱️ Results for commit 07c4a9a. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Pull request overview
This PR updates the Windows CustomData script template filename to avoid PowerShell auto-formatting interfering with the {{ ... }} templating syntax, and updates code/docs to reference the new template name.
Changes:
- Renamed the Windows CustomData template to
kuberneteswindowssetup.ps1.templateand updated the Go constant used to load it from the embeddedparts/filesystem. - Updated Windows CSE documentation/comments to reference the new template filename.
- Updated repo guidance docs to reflect the new filename (with a few doc issues noted in review comments).
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
staging/cse/windows/README |
Updates the reference to where the Windows CSE scripts package version is defined. |
pkg/agent/const.go |
Switches the Windows CustomData template path to windows/kuberneteswindowssetup.ps1.template. |
parts/windows/windowscsehelper.ps1 |
Updates an inline comment to reference the new template filename. |
parts/windows/kuberneteswindowssetup.ps1.template |
Adds the renamed Windows CustomData template file (Go-templated PowerShell). |
AGENTS.md |
Updates documentation references related to the Windows CSE template (contains a couple of incorrect paths per review comments). |
.github/copilot-instructions.md |
Updates Copilot guidance docs to reference the new template filename. |
Suppressed comments (1)
AGENTS.md:141
- This reference also uses the non-existent
kuberneteswindowssetup.ps1.template.templatepath. It should match the actual fileparts/windows/kuberneteswindowssetup.ps1.template.
- **Context**: PIS bakes a VHD from a temporary VM, then boots many real nodes from it. Same model in Windows `parts/windows/kuberneteswindowssetup.ps1.template` (`BasePrep`/`NodePrep`) and Linux `parts/linux/cloud-init/artifacts/cse_main.sh` (`basePrep`/`nodePrep`):
2fcd7f7 to
36680dc
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.
Suppressed comments (1)
AGENTS.md:30
- This section removed the guidance to run
make generateafter modifyingparts/orpkg/. The Makefilegeneratetarget refreshes Go testdata and other generated artifacts, so removing this note is likely unintentional and could cause contributors to miss required regeneration steps.
[parts](./parts/) serves both AgentBaker Service and VHD build. AgentBaker service and VHDs are coupled because of this shared component. When building VHD, packer maps and renames scripts from [parts](./parts/) depending on the OS / versions. The mappings can be found at [packer](./vhdbuilder/packer/).
Windows uses a different folder [cse](./staging/cse/windows/) for almost the same purpose. There are subtle differences as windows CSEs can be downloaded as a zip file during provisioning time due to restrictions on the file size on Windows system, while for linux based systems the cse/custom data are dropped in during provisioning time.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.
Suppressed comments (1)
AGENTS.md:30
- This change removes the contributor guidance about running
make generateafter editingparts/orpkg/. The PR description is only about renaming the Windows template file; if the guidance is still required to keep generated/snapshot data in sync, it should be kept (or moved deliberately with a note in the PR description).
[parts](./parts/) serves both AgentBaker Service and VHD build. AgentBaker service and VHDs are coupled because of this shared component. When building VHD, packer maps and renames scripts from [parts](./parts/) depending on the OS / versions. The mappings can be found at [packer](./vhdbuilder/packer/).
Windows uses a different folder [cse](./staging/cse/windows/) for almost the same purpose. There are subtle differences as windows CSEs can be downloaded as a zip file during provisioning time due to restrictions on the file size on Windows system, while for linux based systems the cse/custom data are dropped in during provisioning time.
What this PR does / why we need it:
Autoformatting of the .ps1 file breaks the handlebars template as it adds a space between the {{ and }}.
Renaming the file avoids this future pain.
Which issue(s) this PR fixes:
Fixes #