Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 11 additions & 10 deletions .github/actions/action-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@ const util = require("util");
const fs = require("fs");
const jsExec = util.promisify(require("child_process").exec);

module.exports.installAndRequirePackages = async function(...newPackages)
{
module.exports.installAndRequirePackages = async function (...packages) {
// Back-compat: allow strings ("@actions/core") as well as objects ({ name, version })
const normalized = packages.map(p => typeof p === "string" ? { name: p } : p);

const installSpecs = normalized.map(p =>
p.version ? `${p.name}@${p.version}` : p.name
);

console.log("Installing npm dependency");
const { stdout, stderr } = await jsExec(`npm install ${newPackages.join(' ')}`);
const { stdout, stderr } = await jsExec(`npm install ${installSpecs.join(" ")}`);
console.log("npm-install stderr:\n\n" + stderr);
console.log("npm-install stdout:\n\n" + stdout);
console.log("Finished installing npm dependencies");

let requiredPackages = [];
for (const packageName of newPackages) {
requiredPackages.push(require(packageName));
}

return requiredPackages;
}
return normalized.map(p => require(p.name));
};

function splitVersionTag(tag) {
const regex = /v(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(-(?<versionLabel>[a-zA-Z]+)\.(?<iteration>\d+))?/;
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/generate-release-notes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const UpdateReleaseNotesLabel = "update-release-notes";
const BackportLabel = "backport";

async function run() {
const [core, github] = await actionUtils.installAndRequirePackages("@actions/core", "@actions/github");
const [core, github] = await actionUtils.installAndRequirePackages({ name: "@actions/core", version: "2" }, { name: "@actions/github", version: "8" });

const octokit = github.getOctokit(core.getInput("auth_token", { required: true }));

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/learning-path-staleness-check/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function ValidateLinks(learningPathContents, repoURLToSearch, modifiedPRFiles, l

const main = async () => {

const [core] = await actionUtils.installAndRequirePackages("@actions/core");
const [core] = await actionUtils.installAndRequirePackages({ name: "@actions/core", version: "2" });

try {
const learningPathDirectory = core.getInput('learningPathsDirectory', { required: true });
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/update-releases-json/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const actionUtils = require('../action-utils.js');
const path = require('path');

async function run() {
const [core, github] = await actionUtils.installAndRequirePackages("@actions/core", "@actions/github");
const [core, github] = await actionUtils.installAndRequirePackages({ name: "@actions/core", version: "2" }, { name: "@actions/github", version: "8" });

const releasesDataFile = core.getInput("releases_json_file", { required: true });
let octokit = undefined;
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/update-releases-md/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const actionUtils = require('../action-utils.js');

async function run() {
const [core, github] = await actionUtils.installAndRequirePackages("@actions/core", "@actions/github");
const [core, github] = await actionUtils.installAndRequirePackages({ name: "@actions/core", version: "2" }, { name: "@actions/github", version: "8" });

const releasesDataFile = core.getInput("releases_json_file", { required: true });
const outputFile = core.getInput("releases_md_file", { required: true });
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ jobs:
with:
persist-credentials: false

- uses: streetsidesoftware/cspell-action@9cd41bb518a24fefdafd9880cbab8f0ceba04d28
- uses: streetsidesoftware/cspell-action@de2a73e963e7443969755b648a1008f77033c5b2
name: Documentation spellcheck
if: ${{ !cancelled() }}
with:
files: '**/*.md'
inline: error
incremental_files_only: true

- uses: streetsidesoftware/cspell-action@9cd41bb518a24fefdafd9880cbab8f0ceba04d28
- uses: streetsidesoftware/cspell-action@de2a73e963e7443969755b648a1008f77033c5b2
name: Resx spellcheck
if: ${{ !cancelled() }}
with:
files: 'src/**/*.resx'
inline: error
incremental_files_only: true

- uses: streetsidesoftware/cspell-action@9cd41bb518a24fefdafd9880cbab8f0ceba04d28
- uses: streetsidesoftware/cspell-action@de2a73e963e7443969755b648a1008f77033c5b2
name: Source code spellcheck
if: ${{ !cancelled() }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/submit-to-do-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# The default artifact download action doesn't support cross-workflow
# artifacts, so use a 3rd party one.
- name: 'Download linting results'
uses: dawidd6/action-download-artifact@8a338493df3d275e4a7a63bcff3b8fe97e51a927
uses: dawidd6/action-download-artifact@8305c0f1062bb0d184d09ef4493ecb9288447732
with:
workflow: ${{env.workflow_name}}
run_id: ${{github.event.workflow_run.id }}
Expand Down
20 changes: 10 additions & 10 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-dotnet</Uri>
<Sha>b0f34d51fccc69fd334253924abd8d6853fad7aa</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26177.7">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26201.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>62dc2defffeadabf6761a9ed7e142692107330c0</Sha>
<Sha>2ad6e0a00c692279222642dbcd6e72eb21572d93</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="10.0.0-beta.26177.7">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="10.0.0-beta.26201.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>62dc2defffeadabf6761a9ed7e142692107330c0</Sha>
<Sha>2ad6e0a00c692279222642dbcd6e72eb21572d93</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="10.0.0-beta.26177.7">
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="10.0.0-beta.26201.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>62dc2defffeadabf6761a9ed7e142692107330c0</Sha>
<Sha>2ad6e0a00c692279222642dbcd6e72eb21572d93</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.26177.7">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.26201.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>62dc2defffeadabf6761a9ed7e142692107330c0</Sha>
<Sha>2ad6e0a00c692279222642dbcd6e72eb21572d93</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="10.0.0-beta.26177.7">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="10.0.0-beta.26201.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>62dc2defffeadabf6761a9ed7e142692107330c0</Sha>
<Sha>2ad6e0a00c692279222642dbcd6e72eb21572d93</Sha>
</Dependency>
<Dependency Name="Microsoft.FileFormats" Version="1.0.717301">
<Uri>https://github.com/dotnet/diagnostics</Uri>
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
<!-- dotnet/dotnet references -->
<MicrosoftAspNetCoreAppRuntimewinx64Version>10.0.0</MicrosoftAspNetCoreAppRuntimewinx64Version>
<MicrosoftCodeAnalysisNetAnalyzersVersion>10.0.100</MicrosoftCodeAnalysisNetAnalyzersVersion>
<MicrosoftDotNetBuildTasksArchivesVersion>10.0.0-beta.26177.7</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetCodeAnalysisVersion>10.0.0-beta.26177.7</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetXUnitExtensionsVersion>10.0.0-beta.26177.7</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetBuildTasksArchivesVersion>10.0.0-beta.26201.4</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetCodeAnalysisVersion>10.0.0-beta.26201.4</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetXUnitExtensionsVersion>10.0.0-beta.26201.4</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftNETCoreAppRuntimewinx64Version>10.0.0</MicrosoftNETCoreAppRuntimewinx64Version>
<SystemCommandLineVersion>2.0.0</SystemCommandLineVersion>
<VSRedistCommonAspNetCoreSharedFrameworkx64100Version>10.0.0-rtm.25523.111</VSRedistCommonAspNetCoreSharedFrameworkx64100Version>
Expand Down
6 changes: 3 additions & 3 deletions eng/dependabot/independent/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
<AzureIdentityVersion>1.20.0</AzureIdentityVersion>
<AzureStorageBlobsVersion>12.27.0</AzureStorageBlobsVersion>
<AzureStorageQueuesVersion>12.25.0</AzureStorageQueuesVersion>
<MicrosoftIdentityWebVersion>4.6.0</MicrosoftIdentityWebVersion>
<MicrosoftIdentityWebVersion>4.7.0</MicrosoftIdentityWebVersion>
<MicrosoftOpenApiReadersVersion>1.6.28</MicrosoftOpenApiReadersVersion>
<SystemPrivateUriVersion>4.3.2</SystemPrivateUriVersion>
<SystemSecurityPrincipalWindowsVersion>5.0.0</SystemSecurityPrincipalWindowsVersion>

<!-- Third-party references -->
<NewtonsoftJsonVersion>13.0.4</NewtonsoftJsonVersion>
<NJsonSchemaVersion>11.5.2</NJsonSchemaVersion>
<AwsSdkS3Version>4.0.19.4</AwsSdkS3Version>
<AwsSdkSecurityTokenVersion>4.0.5.15</AwsSdkSecurityTokenVersion>
<AwsSdkS3Version>4.0.20.4</AwsSdkS3Version>
<AwsSdkSecurityTokenVersion>4.0.5.19</AwsSdkSecurityTokenVersion>

<!--
Moq version & constants derived from Moq.
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26177.7",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26177.7"
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26201.4",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26201.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Microsoft.Diagnostics.Monitoring.WebApi;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
Expand Down Expand Up @@ -82,7 +83,7 @@ public async Task DefaultDiagnosticPort_Supported_ListenModeOnNonWindows()

await Task.Delay(TimeSpan.FromSeconds(10)); // Allow some time for the socket to be created.

AssertDefaultDiagnosticPortExists(defaultSharedTempDir);
await AssertDefaultDiagnosticPortExistsAsync(defaultSharedTempDir);
}

/// <summary>
Expand All @@ -109,10 +110,16 @@ private static string GetDefaultSharedSocketPath(string defaultSharedPath)
return Path.Combine(defaultSharedPath, ToolIdentifiers.DefaultSocketName);
}

private static void AssertDefaultDiagnosticPortExists(TemporaryDirectory dir)
private static async Task AssertDefaultDiagnosticPortExistsAsync(TemporaryDirectory dir)
{
string diagnosticPort = GetDefaultSharedSocketPath(dir.FullName);
Assert.True(File.Exists(diagnosticPort), $"Expected socket to exist at '{diagnosticPort}'.");

using CancellationTokenSource cancellationSource = new CancellationTokenSource(CommonTestTimeouts.GeneralTimeout);

while (!File.Exists(diagnosticPort))
{
await Task.Delay(TimeSpan.FromMilliseconds(50), cancellationSource.Token);
}
}

private static void AssertDefaultDiagnosticPortNotExists(TemporaryDirectory dir)
Expand Down
14 changes: 8 additions & 6 deletions src/Tools/dotnet-monitor/dotnet-monitor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@
<ItemGroup>
<ProjectReference Include="..\..\Microsoft.Diagnostics.Monitoring.Options\Microsoft.Diagnostics.Monitoring.Options.csproj" />
<ProjectReference Include="..\..\Microsoft.Diagnostics.Monitoring.WebApi\Microsoft.Diagnostics.Monitoring.WebApi.csproj" />
<!-- This is a build-ordering dependency only - we don't want this hook to appear directly in the our referenced libraries, we
need to customize it's layout. We _do_ however need to ensure that it _gets built_ before we build/publish. -->
<!-- This is a build-ordering dependency only - we don't want this hook to appear directly in our referenced libraries, we
need to customize its layout. We _do_ however need to ensure that it _gets built_ before we build/publish.
The actual publish of StartupHook is handled by PublishProjectsBeforePack (during pack) and
PublishProjectsAfterBuild in eng/AfterSolutionBuild.targets (during CI).
Do NOT add AdditionalProperties or Targets="Publish" here - doing so creates a separate MSBuild
project instance that races with test projects' references during parallel builds. -->
<ProjectReference Include="..\..\Microsoft.Diagnostics.Monitoring.StartupHook\Microsoft.Diagnostics.Monitoring.StartupHook.csproj"
AdditionalProperties="RuntimeIdentifier=;PublishDir=$(StartupHookPublishPath)"
GlobalPropertiesToRemove="PublishSingleFile"
Targets="Publish"
ReferenceOutputAssembly="false" />
ReferenceOutputAssembly="false"
Private="false" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading