Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upd dotnet6 agent #4150

Merged
merged 24 commits into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8dd8075
Catch updating exception (#4082)
Roman-Shchukin Dec 12, 2022
b12a109
Node16 version updated to 16.17.1" (#4084)
Roman-Shchukin Dec 12, 2022
2ed3a2e
Bump ubuntu image version to 20.04 (#4079)
KonstantinTyukalov Dec 12, 2022
6d0bf0d
Prevent creating host container network (#3788)
hez2010 Dec 12, 2022
27e3d4e
Allow env.sh to accept additional env var names (#3339)
ricksbrown Dec 12, 2022
7e2a3a1
Revert "Fix execution of scripts in variables (#4016)" (#4088)
LiliaSabitova Dec 13, 2022
0f3401a
Add Ubuntu 18.04 (#3943)
geekzter Dec 15, 2022
82f092c
Make agent update list of systems supporting .NET 6 periodically (#4081)
sergey-koryshev Dec 16, 2022
c42fd0c
Retries to lock Services database (#4085)
DenisRumyantsev Dec 16, 2022
e76a890
Fixed name of DockerAdditionalNetworkOptions Knob (#3888)
icnocop Dec 16, 2022
df73f63
Format agent source code (#4101)
KonstantinTyukalov Dec 26, 2022
24d4035
Fix SonarQube's "'Any()' should be used to test for emptiness" / Code…
marodev Jan 4, 2023
866c696
Add script to predict v2->v3 upgrade compatibility (#4092)
geekzter Jan 5, 2023
dbdb0bf
Added strict boolean knob values (#4103)
KonstantinTyukalov Jan 16, 2023
96a6922
update build-job (#4110)
ivanduplenskikh Jan 17, 2023
92e289b
fix dotnet host search (#4124)
ivanduplenskikh Jan 23, 2023
18080a2
Add option to skip rhel6 in pipeline and ci (#4121)
Roman-Shchukin Jan 23, 2023
f310843
Update dotnet to 3.1.32 (#4112)
kirill-ivlev Jan 23, 2023
1055f4c
DockerLogin retries (#4100)
ivanduplenskikh Jan 24, 2023
d37241e
Add the exact operation system version and environment to the telemet…
LiliaSabitova Jan 24, 2023
d503197
Mingit version upgraded to 2.39.1 (#4126)
ismayilov-ismayil Jan 26, 2023
37bb9cf
Fix agent lint errors (#4117)
KonstantinTyukalov Feb 1, 2023
4b66e90
Revert "Allow env.sh to accept additional env var names (#3339)" (#4143)
KonstantinTyukalov Feb 2, 2023
38c89d5
Merge branch 'master' into upd_dotnet6_agent
kirill-ivlev Feb 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vsts.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ parameters:
default: true
- name: macOS_arm64
type: boolean
displayName: macOS (arm64)
displayName: macOS (arm64)m
default: true
- name: skipRhelRelease
type: boolean
Expand Down
3 changes: 0 additions & 3 deletions src/Agent.Sdk/Util/ExceptionsUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
// Licensed under the MIT License.

using System;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Text;
using Microsoft.VisualStudio.Services.Agent;
using Microsoft.VisualStudio.Services.Agent.Util;

namespace Agent.Sdk.Util
Expand Down
3 changes: 0 additions & 3 deletions src/Agent.Sdk/Util/ILoggedSecretMasker.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Microsoft.TeamFoundation.DistributedTask.Logging;
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;

namespace Agent.Sdk.Util
{
Expand Down
3 changes: 0 additions & 3 deletions src/Agent.Sdk/Util/LoggedSecretMasker.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Microsoft.TeamFoundation.DistributedTask.Logging;
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;

namespace Agent.Sdk.Util
{
Expand Down
2 changes: 0 additions & 2 deletions src/Agent.Sdk/Util/MaskingUtil.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using Microsoft.VisualStudio.Services.ServiceEndpoints.WebApi;
using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.VisualStudio.Services.Agent.Util
{
Expand Down
7 changes: 0 additions & 7 deletions src/Agent.Sdk/Util/PlatformUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,16 @@
// Licensed under the MIT License.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Sockets;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Xml.Linq;
using Agent.Sdk.Knob;
using Agent.Sdk.Util;
using BuildXL.Cache.MemoizationStore.Interfaces.Caches;
using BuildXL.Utilities;
using Microsoft.TeamFoundation.Build.WebApi;
using Microsoft.VisualStudio.Services.Agent.Util;
using Microsoft.Win32;
using Newtonsoft.Json;
Expand Down
2 changes: 1 addition & 1 deletion src/Agent.Worker/ContainerOperationProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ private async Task CreateContainerNetworkAsync(IExecutionContext executionContex
{
Trace.Entering();
ArgUtil.NotNull(executionContext, nameof(executionContext));

if (network != "host")
{
int networkExitCode = await _dockerManger.DockerNetworkCreate(executionContext, network);
Expand Down
34 changes: 16 additions & 18 deletions src/Agent.Worker/Handlers/StepHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,24 +210,22 @@ public async Task<int> ExecuteAsync(string workingDirectory,
// It appears that node.exe outputs UTF8 when not in TTY mode.
outputEncoding = Encoding.UTF8;
}
using (var redirectStandardIn = new InputQueue<string>())
{
var payloadJson = JsonUtility.ToString(payload);
redirectStandardIn.Enqueue(payloadJson);
HostContext.GetTrace(nameof(ContainerStepHost)).Info($"Payload: {payloadJson}");
return await processInvoker.ExecuteAsync(workingDirectory: HostContext.GetDirectory(WellKnownDirectory.Work),
fileName: containerEnginePath,
arguments: containerExecutionArgs,
environment: null,
requireExitCodeZero: requireExitCodeZero,
outputEncoding: outputEncoding,
killProcessOnCancel: killProcessOnCancel,
redirectStandardIn: redirectStandardIn,
inheritConsoleHandler: inheritConsoleHandler,
continueAfterCancelProcessTreeKillAttempt: continueAfterCancelProcessTreeKillAttempt,
cancellationToken: cancellationToken);
}


using var redirectStandardIn = new InputQueue<string>();
var payloadJson = JsonUtility.ToString(payload);
redirectStandardIn.Enqueue(payloadJson);
HostContext.GetTrace(nameof(ContainerStepHost)).Info($"Payload: {payloadJson}");
return await processInvoker.ExecuteAsync(workingDirectory: HostContext.GetDirectory(WellKnownDirectory.Work),
fileName: containerEnginePath,
arguments: containerExecutionArgs,
environment: null,
requireExitCodeZero: requireExitCodeZero,
outputEncoding: outputEncoding,
killProcessOnCancel: killProcessOnCancel,
redirectStandardIn: redirectStandardIn,
inheritConsoleHandler: inheritConsoleHandler,
continueAfterCancelProcessTreeKillAttempt: continueAfterCancelProcessTreeKillAttempt,
cancellationToken: cancellationToken);
}
}

Expand Down
9 changes: 4 additions & 5 deletions src/Agent.Worker/WorkerCommandManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,10 @@ public bool TryProcessCommand(IExecutionContext context, string input)
}
catch (SocketException ex)
{
using (var vssConnection = WorkerUtilities.GetVssConnection(context))
{
ExceptionsUtil.HandleSocketException(ex, vssConnection.Uri.ToString(), context.Error);
context.CommandResult = TaskResult.Failed;
}
using var vssConnection = WorkerUtilities.GetVssConnection(context);

ExceptionsUtil.HandleSocketException(ex, vssConnection.Uri.ToString(), context.Error);
context.CommandResult = TaskResult.Failed;
}
catch (Exception ex)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Misc/externals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NODE_URL=https://nodejs.org/dist
NODE_VERSION="6.17.1"
NODE10_VERSION="10.24.1"
NODE16_VERSION="16.17.1"
MINGIT_VERSION="2.38.1"
MINGIT_VERSION="2.39.1"
LFS_VERSION="2.13.3"

get_abs_path() {
Expand Down
2 changes: 1 addition & 1 deletion src/Test/L0/SecretMaskerTests/LoggedSecretMaskerL0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected virtual void Dispose(bool disposing)
}

_secretMasker.Dispose();
_secretMasker= null;
_secretMasker = null;

disposedValue = true;
}
Expand Down