Skip to content

Commit 265d971

Browse files
[Backport 7.72.x] Remove Update Install Source Custom Action (#42186)
Backport 5797a72 from #42114. ___ ### What does this PR do? This PR removes the update install source custom action that was added in: #40511 ### Motivation https://datadoghq.atlassian.net/browse/WINA-1929 The custom action updated the install source after installing via MSI to use the fleet package name and msi path. This can potentially cause reinstalls to fail as MSI does not use the sourcelist path during reinstalls. ### Describe how you validated your changes Since this is just removing a custom action, the existing e2e tests should ensure that the agent installs and uninstalls just fine. ### Additional Notes Co-authored-by: mrafi97 <36865458+mrafi97@users.noreply.github.com>
1 parent f42be85 commit 265d971

8 files changed

Lines changed: 1 addition & 157 deletions

File tree

releasenotes/notes/fleet-automation-msi-update-install-source-edbfaccf24bece0f.yaml

Lines changed: 0 additions & 3 deletions
This file was deleted.

test/new-e2e/tests/installer/windows/suites/agent-package/upgrade_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,7 @@ func (s *testAgentUpgradeSuite) TestUpgradeWithLocalSystemUser() {
573573

574574
// TestDowngradeWithMissingInstallSource tests that a downgrade will succeed even if the original install source is missing
575575
func (s *testAgentUpgradeSuite) TestDowngradeWithMissingInstallSource() {
576+
s.T().Skip("Skipping test due to removal of update install source custom action")
576577
// Arrange
577578
s.setAgentConfig()
578579
s.installCurrentAgentVersion()

tools/windows/DatadogAgentInstaller/AgentCustomActions/CustomAction.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ public static ActionResult SetupInstaller(Session session)
5959
return Datadog.CustomActions.SetupInstallerCustomAction.SetupInstaller(session);
6060
}
6161

62-
[CustomAction]
63-
public static ActionResult UpdateInstallSource(Session session)
64-
{
65-
return Datadog.CustomActions.UpdateInstallSourceCustomAction.UpdateInstallSource(session);
66-
}
67-
6862
[CustomAction]
6963
public static ActionResult ReportFailure(Session session)
7064
{

tools/windows/DatadogAgentInstaller/CustomActions.Tests/CustomActions.Tests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
</ItemGroup>
7171
<ItemGroup>
7272
<Compile Include="APM\ApmConfigTests.cs" />
73-
<Compile Include="InstallSource\InstallSourceTests.cs" />
7473
<Compile Include="InstallState\InstallStateTests.cs" />
7574
<Compile Include="InstallState\InstallStateTestSetup.cs" />
7675
<Compile Include="ProcessUserCustomActions\BaseProcessUserCustomActionsDomainTests.cs" />

tools/windows/DatadogAgentInstaller/CustomActions.Tests/InstallSource/InstallSourceTests.cs

Lines changed: 0 additions & 56 deletions
This file was deleted.

tools/windows/DatadogAgentInstaller/CustomActions/CustomActions.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@
9696
<Compile Include="ServiceCustomAction.cs" />
9797
<Compile Include="PatchInstallerCustomAction.cs" />
9898
<Compile Include="SetupInstallerCustomAction.cs" />
99-
<Compile Include="UpdateInstallSourceCustomAction.cs" />
10099
<Compile Include="PythonDistributionCustomAction.cs" />
101100
<Compile Include="Extensions\SessionExtensions.cs" />
102101
<Compile Include="Interfaces\ISession.cs" />

tools/windows/DatadogAgentInstaller/CustomActions/UpdateInstallSourceCustomAction.cs

Lines changed: 0 additions & 71 deletions
This file was deleted.

tools/windows/DatadogAgentInstaller/WixSetup/Datadog Agent/AgentCustomActions.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ public class AgentCustomActions
2020

2121
public ManagedAction SetupInstaller { get; set; }
2222

23-
public ManagedAction UpdateInstallSource { get; set; }
24-
2523
public ManagedAction EnsureGeneratedFilesRemoved { get; }
2624

2725
public ManagedAction WriteConfig { get; }
@@ -322,23 +320,6 @@ public AgentCustomActions()
322320
.SetProperties(
323321
"PROJECTLOCATION=[PROJECTLOCATION], FLEET_INSTALL=[FLEET_INSTALL], DATABASE=[DATABASE]");
324322

325-
UpdateInstallSource = new CustomAction<CustomActions>(
326-
new Id(nameof(UpdateInstallSource)),
327-
CustomActions.UpdateInstallSource,
328-
Return.check,
329-
// The built-in RegisterProduct action normally sets the install source,
330-
// so our action must come after it to take effect.
331-
When.Before,
332-
Step.InstallFinalize,
333-
Conditions.FirstInstall | Conditions.Upgrading
334-
)
335-
{
336-
Execute = Execute.deferred,
337-
Impersonate = false
338-
}
339-
.SetProperties(
340-
"PROJECTLOCATION=[PROJECTLOCATION], FLEET_INSTALL=[FLEET_INSTALL], DATABASE=[DATABASE], AgentFlavor=[AgentFlavor]");
341-
342323
// Cleanup leftover files on uninstall
343324
CleanupOnUninstall = new CustomAction<CustomActions>(
344325
new Id(nameof(CleanupOnUninstall)),

0 commit comments

Comments
 (0)