Skip to content

test: verify hotfix-generate GH Action on official/v20260320#8147

Open
Devinwong wants to merge 6 commits intoofficial/v20260320from
devinwon/hotfix-test-v20260320
Open

test: verify hotfix-generate GH Action on official/v20260320#8147
Devinwong wants to merge 6 commits intoofficial/v20260320from
devinwon/hotfix-test-v20260320

Conversation

@Devinwong
Copy link
Collaborator

@Devinwong Devinwong commented Mar 20, 2026

Test PR for hotfix-generate GH Action

End-to-end test of the hotfix-generate workflow (PR #8131).

What was tested

  1. Added a dummy function to cse_helpers.sh (maps to provisionSource)
  2. Added a dummy function to ubuntu/cse_install_ubuntu.sh (maps to provisionInstallsUbuntu, expands to all distro variants)

Results (3 successful runs)

  • Run 1: Detected cse_helpers.sh → injected 1 write_files block (provisionSource) ✅
  • Run 2: Same detection after adding a real function (not just a comment) ✅
  • Run 3: Detected both scripts → injected 2 write_files blocks (provisionSource + distro group with 5 variants) ✅

Key observations

  • make generate produces no testdata diffs for script changes — Linux snapshot testdata was removed in PR fix: remove Linux snapshot test cases and testdata #8139
  • make generate is still useful as a validation step (shellcheck, components schema)
  • Script content is embedded via go:embed at compile time, not stored in intermediate files
  • The GH Action correctly uses Contents API + aks-node-assistant[bot] for signed commits
  • Distro expansion (provisionInstallsUbuntu → all 5 distro variants) works correctly

Commits on this branch

# Author Description
1 Developer Test comment in cse_helpers.sh
2 aks-node-assistant[bot] Auto-generated hotfix template (1 block)
3 Developer Dummy function in cse_helpers.sh
4 aks-node-assistant[bot] Auto-generated hotfix template (1 block)
5 Developer Dummy function in cse_install_ubuntu.sh
6 aks-node-assistant[bot] Auto-generated hotfix template (2 blocks)

This is a test PR — do not merge.

Add test comment to cse_helpers.sh to trigger hotfix template injection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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

Test PR intended to validate the hotfix-generate GitHub Action end-to-end by introducing a detectable change under parts/linux/cloud-init/artifacts/ (which should trigger regeneration/commit behavior).

Changes:

  • Added a test-only comment to cse_helpers.sh to trigger the workflow.

@@ -1,4 +1,5 @@
#!/bin/bash
# hotfix test: verify GH Action injects write_files block into nodecustomdata.yml
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

This comment is a test artifact (per PR description) and should be removed before merging to avoid leaving workflow/debug text in production provisioning scripts.

Suggested change
# hotfix test: verify GH Action injects write_files block into nodecustomdata.yml

Copilot uses AI. Check for mistakes.
@Devinwong Devinwong changed the title test: verify hotfix-generate GH Action on official/v20260320 [DO NOT review] test: verify hotfix-generate GH Action on official/v20260320 (no testdata diff case) Mar 20, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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

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

Comment on lines +3 to +6
hotfix_test_ubuntu_dummy() {
echo "dummy function for ubuntu hotfix testing"
}

Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

hotfix_test_ubuntu_dummy is test-only, unused code in a production provisioning script. If this accidentally merges it becomes part of the shipped CSE artifacts and increases the risk of future conflicts/maintenance overhead; please remove it (or keep workflow tests confined to non-shipping fixtures).

Suggested change
hotfix_test_ubuntu_dummy() {
echo "dummy function for ubuntu hotfix testing"
}

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +33
# ---- hotfix: auto-generated by hotfix-generate GH Action ----
- path: {{GetCSEHelpersScriptFilepath}}
permissions: "0744"
encoding: gzip
owner: root
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

This hotfix-generated write_files entry is placed inside the EnableScriptlessCSECmd branch, which explicitly documents that no cloud-init scripts should be written in scriptless mode. Adding {{GetCSEHelpersScriptFilepath}} here will re-introduce script content into custom data and will break the scriptless-mode invariant (there is an e2e assertion that custom data only contains scriptless-cse-overrides.txt). The injected block should be moved outside the scriptless branch (or gated by a separate hotfix flag) so scriptless custom data remains script-free.

Copilot uses AI. Check for mistakes.
Comment on lines +2 to +8
# hotfix test: verify GH Action injects write_files block into nodecustomdata.yml
# ERR_SYSTEMCTL_ENABLE_FAIL=3 Service could not be enabled by systemctl -- DEPRECATED

hotfix_test_dummy_function() {
local msg="this is a dummy function for hotfix testing"
echo "$msg"
}
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

hotfix_test_dummy_function and the preceding test comment will ship to every node because cse_helpers.sh is a shared provisioning artifact that gets embedded into custom data. Since this is a test-only change, it should be removed (or confined to the workflow test harness) to avoid accumulating dead code in production bootstrap scripts.

Suggested change
# hotfix test: verify GH Action injects write_files block into nodecustomdata.yml
# ERR_SYSTEMCTL_ENABLE_FAIL=3 Service could not be enabled by systemctl -- DEPRECATED
hotfix_test_dummy_function() {
local msg="this is a dummy function for hotfix testing"
echo "$msg"
}
# ERR_SYSTEMCTL_ENABLE_FAIL=3 Service could not be enabled by systemctl -- DEPRECATED

Copilot uses AI. Check for mistakes.
@Devinwong Devinwong changed the title [DO NOT review] test: verify hotfix-generate GH Action on official/v20260320 (no testdata diff case) test: verify hotfix-generate GH Action on official/v20260320 Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotfix Only use this label when you are hot fixing an official release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants