Skip to content

fix: don't fail when windows cilium script not present - #9192

Open
Tim Wright (timmy-wright) wants to merge 2 commits into
mainfrom
timmy/dontfail
Open

fix: don't fail when windows cilium script not present#9192
Tim Wright (timmy-wright) wants to merge 2 commits into
mainfrom
timmy/dontfail

Conversation

@timmy-wright

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

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 CSE Windows Cilium Networking installer wrapper to avoid throwing/terminating when the expected install.ps1 script is not present, by guarding the invocation with a Test-Path check and logging instead.

Changes:

  • Add an existence check before invoking the Windows Cilium Networking install script.
  • Log a message (instead of failing) when the install script cannot be found.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 99 to +104
$wcnInstallScript = $global:WindowsCiliumInstallPath | Join-Path -ChildPath 'scripts' | Join-Path -ChildPath 'install' | Join-Path -ChildPath 'install.ps1'
& $wcnInstallScript @Arguments
if (Test-Path -Path $wcnInstallScript -PathType Leaf) {
& $wcnInstallScript @Arguments
} else {
Write-Log "Windows Cilium Networking installation script could not be found: $wcnInstallScript"
}
Comment on lines +100 to +104
if (Test-Path -Path $wcnInstallScript -PathType Leaf) {
& $wcnInstallScript @Arguments
} else {
Write-Log "Windows Cilium Networking installation script could not be found: $wcnInstallScript"
}
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

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

Results for commit 41534ad.

♻️ This comment has been updated with latest results.

Copilot AI review requested due to automatic review settings August 13, 2026 02:59

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 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (2)

staging/cse/windows/windowsciliumnetworkingfunc.ps1:63

  • Invoke-WindowsCiliumNetworkingInstallScript may now skip execution when the install script is missing, but Enable-WindowsCiliumNetworking still logs "installation completed successfully" unconditionally. This is misleading during debugging because the install can be a no-op without any failure.
        Write-Log "Windows Cilium Networking installation completed successfully$(if ($isRebootNeeded) { ' (restart required)' })."
        if ($isRebootNeeded) {
            $global:RebootNeeded = $true
        }
    } catch {

staging/cse/windows/windowsciliumnetworkingfunc.ps1:102

  • The success-path log message says "Expecting windows cilium install script" even though the file was already found, and the capitalization is inconsistent with other logs. Consider logging that the script is being executed, and make the missing-script message explicitly say it is being skipped.
    if (Test-Path -Path $wcnInstallScript -PathType Leaf) {
        Write-Log "Expecting windows cilium install script at: $wcnInstallScript"
        & $wcnInstallScript @Arguments
    } else {
        Write-Log "Windows Cilium Networking installation script could not be found: $wcnInstallScript"

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.

2 participants