Add R and Git as Windows Fleet-maintained apps - #46988
Conversation
Adds two winget-sourced Windows FMAs:
- R (RProject.R) -> 'R for Windows', Inno Setup exe, machine scope
- Git (Git.Git) -> 'Git', Inno Setup exe, machine scope
Both use custom Inno install/uninstall scripts (no MSI ProductCode) with
registry-UninstallString-based uninstall and fuzzy name matching, since their
ARP DisplayName embeds the version ('R for Windows <ver>', 'Git version <ver>').
test-fma-windows-pr-only.yml: add has_r/has_git detection and removal of the
runner's pre-installed R and Git. Git for Windows provides the Git Bash 'bash'
the workflow uses, so the apps.json filtering is split into its own step that
runs before Git removal, and validation runs 'go run -buildvcs=false' (so Go
does not invoke the now-removed git for VCS stamping).
SSMS was investigated but intentionally skipped: SSMS 21/22 is a Visual Studio
online bootstrapper (no MSI ProductCode, multi-GB network install), which is a
fragile FMA candidate, and the runner has no standalone SSMS to uninstall.
Add React SVG icon components for Git and R that embed PNG images (frontend/pages/SoftwarePage/components/icons/Git.tsx and R.tsx). Add corresponding image assets (website/assets/images/app-icon-git-60x60@2x.png, app-icon-r-60x60@2x.png). Update icons index to import and expose the new icons and register them in SOFTWARE_NAME_TO_ICON_MAP (keys: "git" and "r for windows").
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #46988 +/- ##
==========================================
+ Coverage 67.05% 67.06% +0.01%
==========================================
Files 2892 2890 -2
Lines 225143 225073 -70
Branches 11743 11743
==========================================
- Hits 150968 150950 -18
+ Misses 60503 60453 -50
+ Partials 13672 13670 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
After launching Git for Windows' Inno Setup uninstaller, poll the registry (2s intervals, 120s timeout) until the uninstall entry is removed to handle unins000.exe relaunch behavior; fail if it remains. Also update the Windows output ref to the new uninstall script version so callers (e.g. Fleet's install/uninstall verification) see a consistent post-uninstall state.
Script Diff Resultsee/maintained-apps/outputs/git/windows.json=== Install Script (no changes) ===
=== Uninstall // 61ac5463 -> c16b1f30 ===
--- /tmp/old.cdMnH7 2026-06-06 02:11:09.987210848 +0000
+++ /tmp/new.f6N4Yj 2026-06-06 02:11:09.988210832 +0000
@@ -67,6 +67,28 @@
$process = Start-Process @processOptions
$exitCode = $process.ExitCode
Write-Host "Uninstall exit code: $exitCode"
+
+ # Inno Setup's unins000.exe relaunches itself (it copies to a temp _iu*.tmp and
+ # spawns that copy), so the process we waited on returns BEFORE the uninstall
+ # has finished. Poll the registry until the entry is gone so the post-uninstall
+ # state is consistent for callers (e.g. Fleet's install/uninstall verification).
+ $deadline = (Get-Date).AddSeconds(120)
+ do {
+ Start-Sleep -Seconds 2
+ $stillPresent = $false
+ foreach ($p in $paths) {
+ $match = Get-ItemProperty "$p\*" -ErrorAction SilentlyContinue | Where-Object {
+ $_.DisplayName -like $displayNameLike -and $_.Publisher -like $publisherLike
+ }
+ if ($match) { $stillPresent = $true; break }
+ }
+ } while ($stillPresent -and ((Get-Date) -lt $deadline))
+
+ if ($stillPresent) {
+ Write-Host "Uninstall entry still present after waiting; uninstall did not complete"
+ Exit 1
+ }
+
if ($ExpectedExitCodes -contains $exitCode) { Exit 0 }
Exit $exitCode
} catch {ee/maintained-apps/outputs/r/windows.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) === |
Loosen the registry DisplayName match for Git for Windows to "Git*" and rely on the publisher (The Git Development Community) as the anchor. Updated explanatory comments and matching logic in the workflow and winget uninstall script to handle runners that list Git as just "Git". Also bumped the uninstall_script_ref in ee/maintained-apps/outputs/git/windows.json to reference the updated script.
Script Diff Resultsee/maintained-apps/outputs/git/windows.json=== Install Script (no changes) ===
=== Uninstall // c16b1f30 -> 3233086c ===
--- /tmp/old.1uQQVb 2026-06-06 02:27:48.820604852 +0000
+++ /tmp/new.JzBhGR 2026-06-06 02:27:48.821604866 +0000
@@ -1,8 +1,10 @@
# Locates Git for Windows' Inno Setup uninstaller from the registry and runs it
-# silently. The DisplayName embeds the version (e.g. "Git version 2.54.0"), so
-# match by prefix and require the Git Development Community publisher.
+# silently. The registry DisplayName is not reliably "Git version <ver>" (e.g. the
+# GitHub-hosted runner's Git is listed as just "Git"), so anchor the match on the
+# publisher -- which is unique to Git for Windows -- and only loosely guard the
+# DisplayName. This mirrors the generated exists query's publisher clause.
-$displayNameLike = "Git version *"
+$displayNameLike = "Git*"
$publisherLike = "The Git Development Community*"
$paths = @(ee/maintained-apps/outputs/r/windows.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) === |
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
Pull request overview
This PR adds two new Windows Fleet-maintained apps (FMAs)—R for Windows and Git for Windows—sourced via winget, along with corresponding frontend software icons and CI workflow updates to validate these apps on GitHub-hosted Windows runners.
Changes:
- Added Windows FMA manifests + install/uninstall PowerShell scripts for R (RProject.R) and Git (Git.Git).
- Added Git and R for Windows icons and wired them into the software-name-to-icon mapping.
- Updated the Windows PR-only FMA validation workflow to detect these slugs and remove preinstalled runner copies of R/Git (and avoid
go runVCS stamping when Git is removed).
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
frontend/pages/SoftwarePage/components/icons/Git.tsx |
Adds Git software icon component. |
frontend/pages/SoftwarePage/components/icons/R.tsx |
Adds R for Windows software icon component. |
frontend/pages/SoftwarePage/components/icons/index.ts |
Registers new icons and maps software names (git, r for windows) to icon components. |
ee/maintained-apps/inputs/winget/git.json |
Adds winget input definition for Git (Windows). |
ee/maintained-apps/inputs/winget/r.json |
Adds winget input definition for R (Windows). |
ee/maintained-apps/inputs/winget/scripts/git_install.ps1 |
Adds Git install script (Inno Setup silent install). |
ee/maintained-apps/inputs/winget/scripts/git_uninstall.ps1 |
Adds Git uninstall script (registry-based, Inno Setup, includes completion polling). |
ee/maintained-apps/inputs/winget/scripts/r_install.ps1 |
Adds R install script (Inno Setup silent install). |
ee/maintained-apps/inputs/winget/scripts/r_uninstall.ps1 |
Adds R uninstall script (registry-based, Inno Setup). |
ee/maintained-apps/outputs/git/windows.json |
Adds generated Git Windows manifest (queries, installer URL, scripts embedded by ref). |
ee/maintained-apps/outputs/r/windows.json |
Adds generated R Windows manifest (queries, installer URL, scripts embedded by ref). |
ee/maintained-apps/outputs/apps.json |
Adds Git and R for Windows entries to the published maintained-app catalog list. |
.github/workflows/test-fma-windows-pr-only.yml |
Adds detection + removal steps for preinstalled R/Git and adjusts validation ordering/flags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@georgekarrv more removing things from runners in order to cleanly validate our FMAs. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (13)
WalkthroughThis PR adds Git and R for Windows as new maintained applications. It updates apps.json, adds winget input manifests, adds PowerShell install/uninstall scripts, updates the Windows FMA CI workflow to detect these apps and conditionally remove pre-installed versions, adds Windows release output definitions (installer URL, checksum, detection SQL, script refs), and registers new frontend icon components. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/test-fma-windows-pr-only.yml:
- Around line 561-563: The Inno uninstaller is being launched with Start-Process
using -Wait but its exit code is not checked, so update both invocations of
Start-Process that use $exePath with -PassThru to capture the process object
(e.g., $proc = Start-Process ... -PassThru -Wait -NoNewWindow), then inspect
$proc.ExitCode and throw or call Write-Error/exit with a non-zero status if
ExitCode -ne 0 so the workflow fails fast when the uninstaller fails; apply the
same change to the second Start-Process occurrence that currently waits but does
not validate the exit code.
In `@ee/maintained-apps/inputs/winget/scripts/r_uninstall.ps1`:
- Around line 67-71: Start waiting for the uninstaller to fully finish instead
of reading ExitCode immediately: change the Start-Process invocation using
$processOptions to include -PassThru and ensure you call $process.WaitForExit()
(or use Start-Process -Wait -PassThru) so the script blocks until that process
has exited, then read $process.ExitCode; additionally, for Inno Setup style
uninstallers that spawn helpers, add a short polling loop after WaitForExit that
checks for any remaining processes with the same ProcessName or known child PIDs
and only proceed once those are gone before comparing against $ExpectedExitCodes
and calling Exit.
In `@ee/maintained-apps/outputs/git/windows.json`:
- Around line 6-7: The detection SQLs under the "exists" and "patched" keys
currently use "name LIKE 'Git %'" which misses programs named exactly "Git";
update both queries to check for either name = 'Git' OR name LIKE 'Git %'
(keeping the publisher and version_compare logic intact) so hosts with the exact
"Git" name are correctly detected and evaluated by the exists and patched
checks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 0946d427-11f7-4741-925d-85bf279ce7c5
⛔ Files ignored due to path filters (2)
website/assets/images/app-icon-git-60x60@2x.pngis excluded by!**/*.pngwebsite/assets/images/app-icon-r-60x60@2x.pngis excluded by!**/*.png
📒 Files selected for processing (13)
.github/workflows/test-fma-windows-pr-only.ymlee/maintained-apps/inputs/winget/git.jsonee/maintained-apps/inputs/winget/r.jsonee/maintained-apps/inputs/winget/scripts/git_install.ps1ee/maintained-apps/inputs/winget/scripts/git_uninstall.ps1ee/maintained-apps/inputs/winget/scripts/r_install.ps1ee/maintained-apps/inputs/winget/scripts/r_uninstall.ps1ee/maintained-apps/outputs/apps.jsonee/maintained-apps/outputs/git/windows.jsonee/maintained-apps/outputs/r/windows.jsonfrontend/pages/SoftwarePage/components/icons/Git.tsxfrontend/pages/SoftwarePage/components/icons/R.tsxfrontend/pages/SoftwarePage/components/icons/index.ts
Script Diff Resultsee/maintained-apps/outputs/git/windows.json=== Install Script (no changes) ===
=== Uninstall // c16b1f30 -> 3233086c ===
--- /tmp/old.240P7y 2026-06-08 15:09:05.433495853 +0000
+++ /tmp/new.5m26eN 2026-06-08 15:09:05.433495853 +0000
@@ -1,8 +1,10 @@
# Locates Git for Windows' Inno Setup uninstaller from the registry and runs it
-# silently. The DisplayName embeds the version (e.g. "Git version 2.54.0"), so
-# match by prefix and require the Git Development Community publisher.
+# silently. The registry DisplayName is not reliably "Git version <ver>" (e.g. the
+# GitHub-hosted runner's Git is listed as just "Git"), so anchor the match on the
+# publisher -- which is unique to Git for Windows -- and only loosely guard the
+# DisplayName. This mirrors the generated exists query's publisher clause.
-$displayNameLike = "Git version *"
+$displayNameLike = "Git*"
$publisherLike = "The Git Development Community*"
$paths = @(ee/maintained-apps/outputs/r/windows.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) === |
Adds two winget-sourced Windows FMAs:
Both use custom Inno install/uninstall scripts (no MSI ProductCode) with registry-UninstallString-based uninstall and fuzzy name matching, since their ARP DisplayName embeds the version ('R for Windows ', 'Git version ').
test-fma-windows-pr-only.yml: add has_r/has_git detection and removal of the runner's pre-installed R and Git. Git for Windows provides the Git Bash 'bash' the workflow uses, so the apps.json filtering is split into its own step that runs before Git removal, and validation runs 'go run -buildvcs=false' (so Go does not invoke the now-removed git for VCS stamping).
SSMS was investigated but intentionally skipped: SSMS 21/22 is a Visual Studio online bootstrapper (no MSI ProductCode, multi-GB network install), which is a fragile FMA candidate, and the runner has no standalone SSMS to uninstall.
Summary by CodeRabbit