Skip to content

dockerfiles: windows: fixed VS Build Tools installation#11643

Merged
edsiper merged 1 commit intofluent:masterfrom
mabrarov:feature/dockerfile_windows
Apr 1, 2026
Merged

dockerfiles: windows: fixed VS Build Tools installation#11643
edsiper merged 1 commit intofluent:masterfrom
mabrarov:feature/dockerfile_windows

Conversation

@mabrarov
Copy link
Copy Markdown
Contributor

@mabrarov mabrarov commented Mar 31, 2026

Fixed Visual Studio Build Tools installation when building docker image for Windows Server containers (refer to https://learn.microsoft.com/hr-hr/powershell/module/microsoft.powershell.management/start-process?view=powershell-5.1#-passthru).

Example of issue can be found in https://github.com/fluent/fluent-bit/actions/runs/23797507599/job/69348572273?pr=11397:

Visual Studio Build Tools installer failed with exit code 
At line:1 char:1609
+ ... -ne 3010) { throw "Visual Studio Build Tools installer failed with ex ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Visual Studio B...with exit c 
   ode :String) [], RuntimeException
    + FullyQualifiedErrorId : Visual Studio Build Tools installer failed with  
   exit code 

Testing

  • [N/A] Example configuration file for the change.
  • [N/A] Debug log output from testing the change.
  • [N/A] Attached Valgrind output that shows no leaks or memory corruption was found.
  • [N/A] Run local packaging test showing all targets (including any new ones) build.
  • [N/A] Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • [N/A] Documentation required for this feature.

Backporting

  • [N/A] Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

Summary by CodeRabbit

  • Chores
    • Refined Windows Docker build process for improved reliability in Visual Studio Build Tools installation.

Signed-off-by: Marat Abrarov <abrarov@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

📝 Walkthrough

Walkthrough

The Visual Studio Build Tools installation step in the Windows Docker configuration was updated to use PowerShell's -PassThru flag instead of -NoNewWindow -Wait, capturing the process object for subsequent exit-code validation using proper object variable reference syntax.

Changes

Cohort / File(s) Summary
Windows Docker Build Configuration
dockerfiles/Dockerfile.windows
Updated Visual Studio Build Tools installation process invocation from -NoNewWindow -Wait to -PassThru, ensuring the process object is captured and exit code is correctly referenced via ${p}.ExitCode in both the condition and error message.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

ci/integration-docker-ok

Suggested reviewers

  • niedbalski
  • patrick-stephens
  • celalettin1286

Poem

🐰 A rabbit hops through Docker's build,
PowerShell scripts, so neatly filled,
Process objects caught with -PassThru's grace,
Exit codes checked in their proper place! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing VS Build Tools installation in the Windows Dockerfile.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@edsiper edsiper merged commit 56b67fd into fluent:master Apr 1, 2026
25 of 27 checks passed
@edsiper
Copy link
Copy Markdown
Member

edsiper commented Apr 1, 2026

thank you!

(there is one remaining issue with disk space but I think this PR is good to go)

@mabrarov
Copy link
Copy Markdown
Contributor Author

mabrarov commented Apr 6, 2026

Hi @edsiper,

there is one remaining issue with disk space

Issue with disk space is resolved in #11671.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants