Skip to content

fix: rename template file - #9155

Merged
Tim Wright (timmy-wright) merged 4 commits into
mainfrom
timmy/rename-template-file
Aug 7, 2026
Merged

fix: rename template file#9155
Tim Wright (timmy-wright) merged 4 commits into
mainfrom
timmy/rename-template-file

Conversation

@timmy-wright

Copy link
Copy Markdown
Contributor

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 #

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

  3 files   12 suites   51s ⏱️
389 tests 389 ✅ 0 💤 0 ❌
392 runs  392 ✅ 0 💤 0 ❌

Results for commit 07c4a9a.

♻️ This comment has been updated with latest results.

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

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.template and updated the Go constant used to load it from the embedded parts/ 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.template path. It should match the actual file parts/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`):

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md
Copilot AI review requested due to automatic review settings August 7, 2026 01:41

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

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 generate after modifying parts/ or pkg/. The Makefile generate target 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.

Copilot AI review requested due to automatic review settings August 7, 2026 01:46

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

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 generate after editing parts/ or pkg/. 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.

@timmy-wright
Tim Wright (timmy-wright) merged commit c82568b into main Aug 7, 2026
33 of 35 checks passed
@timmy-wright
Tim Wright (timmy-wright) deleted the timmy/rename-template-file branch August 7, 2026 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore-for-release This pull request will not be included within official release notes windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants