Skip to content

Add R and Git as Windows Fleet-maintained apps#46988

Draft
allenhouchins wants to merge 6 commits into
mainfrom
allenhouchins-r-git-ssms
Draft

Add R and Git as Windows Fleet-maintained apps#46988
allenhouchins wants to merge 6 commits into
mainfrom
allenhouchins-r-git-ssms

Conversation

@allenhouchins
Copy link
Copy Markdown
Member

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 ', '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.

allenhouchins and others added 2 commits June 5, 2026 20:07
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
Copy link
Copy Markdown

codecov Bot commented Jun 6, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.04%. Comparing base (36e4fda) to head (ec85e44).

Files with missing lines Patch % Lines
...ontend/pages/SoftwarePage/components/icons/Git.tsx 50.00% 1 Missing ⚠️
frontend/pages/SoftwarePage/components/icons/R.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #46988      +/-   ##
==========================================
- Coverage   67.04%   67.04%   -0.01%     
==========================================
  Files        2867     2869       +2     
  Lines      225117   225121       +4     
  Branches    11599    11599              
==========================================
+ Hits       150926   150928       +2     
- Misses      60522    60524       +2     
  Partials    13669    13669              
Flag Coverage Δ
frontend 56.97% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 6, 2026

Script Diff Results

ee/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.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 6, 2026

Script Diff Results

ee/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) ===

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.

1 participant