Compare commits

..

2 Commits

Author SHA1 Message Date
Tingluo Huang
7b47280d1d Validate work dir during runner start up. 2026-02-08 22:39:51 -05:00
Takuma Ishikawa
4214709d1b Add support for libssl3 and libssl3t64 for newer Debian/Ubuntu versions (#4213) 2026-02-08 16:03:41 -05:00
3 changed files with 3 additions and 73 deletions

View File

@@ -28,8 +28,8 @@ Debian based OS (Debian, Ubuntu, Linux Mint)
- liblttng-ust1 or liblttng-ust0
- libkrb5-3
- zlib1g
- libssl1.1, libssl1.0.2 or libssl1.0.0
- libicu63, libicu60, libicu57 or libicu55
- libssl3t64, libssl3, libssl1.1, libssl1.0.2 or libssl1.0.0
- libicu76, libicu75, ..., libicu66, libicu65, libicu63, libicu60, libicu57, libicu55, or libicu52
Fedora based OS (Fedora, Red Hat Enterprise Linux, CentOS, Oracle Linux 7)

View File

@@ -102,7 +102,7 @@ then
exit 1
fi
apt_get_with_fallbacks libssl1.1$ libssl1.0.2$ libssl1.0.0$
apt_get_with_fallbacks libssl3t64$ libssl3$ libssl1.1$ libssl1.0.2$ libssl1.0.0$
if [ $? -ne 0 ]
then
echo "'$apt_get' failed with exit code '$?'"

View File

@@ -1076,75 +1076,5 @@ namespace GitHub.Runner.Common.Tests.Listener
Assert.True(hc.AllowAuthMigration);
}
}
[Fact]
[Trait("Level", "L0")]
[Trait("Category", "Runner")]
public async Task RunCommand_ShouldReturnTerminatedError_WhenWorkDirCreationFails()
{
using (var hostCtx = new TestHostContext(this))
{
// Setup: arrange mocks and runner instance
var runnerInstance = new Runner.Listener.Runner();
hostCtx.SetSingleton<IConfigurationManager>(_configurationManager.Object);
hostCtx.SetSingleton<IJobNotification>(_jobNotification.Object);
hostCtx.SetSingleton<IMessageListener>(_messageListener.Object);
hostCtx.SetSingleton<IPromptManager>(_promptManager.Object);
hostCtx.SetSingleton<IConfigurationStore>(_configStore.Object);
hostCtx.SetSingleton<IRunnerServer>(_runnerServer.Object);
hostCtx.EnqueueInstance<IErrorThrottler>(_acquireJobThrottler.Object);
runnerInstance.Initialize(hostCtx);
// Create a file at the work directory path to block directory creation
string workPath = hostCtx.GetDirectory(WellKnownDirectory.Work);
// Clean up any existing directory first
if (Directory.Exists(workPath))
{
Directory.Delete(workPath, recursive: true);
}
// Place a file where the work directory should be - this blocks Directory.CreateDirectory
string parentPath = Path.GetDirectoryName(workPath);
Assert.NotNull(parentPath);
Assert.NotEmpty(parentPath);
Directory.CreateDirectory(parentPath);
const string blockingFileContent = "test file blocking directory creation";
File.WriteAllText(workPath, blockingFileContent);
const int testPoolId = 12345;
const int testAgentId = 67890;
var runnerConfig = new RunnerSettings
{
PoolId = testPoolId,
AgentId = testAgentId
};
_configurationManager.Setup(m => m.LoadSettings()).Returns(runnerConfig);
_configurationManager.Setup(m => m.IsConfigured()).Returns(true);
_configStore.Setup(m => m.IsServiceConfigured()).Returns(false);
try
{
// Execute: run the command which should fail during work dir validation
var cmd = new CommandSettings(hostCtx, new string[] { "run" });
int exitCode = await runnerInstance.ExecuteCommand(cmd);
// Verify: should return TerminatedError code when dir creation fails
Assert.Equal(Constants.Runner.ReturnCode.TerminatedError, exitCode);
}
finally
{
// Cleanup: remove the blocking file
if (File.Exists(workPath))
{
File.Delete(workPath);
}
}
}
}
}
}