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

Helix Restore Issue Mitigation #41311

Merged
merged 27 commits into from Apr 30, 2022
Merged

Helix Restore Issue Mitigation #41311

merged 27 commits into from Apr 30, 2022

Conversation

TanayParikh
Copy link
Member

@TanayParikh TanayParikh commented Apr 21, 2022

No description provided.

@msftbot msftbot bot added the area-infrastructure label Apr 21, 2022
eng/Build.props Outdated Show resolved Hide resolved
eng/helix/content/runtests.cmd Outdated Show resolved Hide resolved
eng/helix/content/runtests.sh Outdated Show resolved Hide resolved
eng/helix/content/RunTests/RunTests.csproj Outdated Show resolved Hide resolved
dougbu
dougbu approved these changes Apr 21, 2022
Copy link
Member

@dougbu dougbu left a comment

If CI validation works, great. Would still prefer you remove the duplication around CA2007

@TanayParikh
Copy link
Member Author

@TanayParikh TanayParikh commented Apr 21, 2022

/mnt/vss/_work/1/s/eng/helix/content/RunTests/RunTests.csproj : error MSB4057: The target "Test" does not exist in the project.
##[error]eng/helix/content/RunTests/RunTests.csproj(0,0): error MSB4057: (NETCORE_ENGINEERING_TELEMETRY=Build) The target "Test" does not exist in the project.

https://dev.azure.com/dnceng/public/_build/results?buildId=1731724&view=logs&jobId=5ac7b393-e840-5549-7fb4-a4479af8e7e3&j=5ac7b393-e840-5549-7fb4-a4479af8e7e3&t=29df2fa2-0d20-51bd-e85a-8b546e86c529

@dougbu
Copy link
Member

@dougbu dougbu commented Apr 21, 2022

@TanayParikh to avoid that, set $(IsUnitTestProject) and $(IsTestProject) to false in the project. Wasn't an issue before but this project name matches our usual test project names

dougbu
dougbu approved these changes Apr 22, 2022
Copy link
Member

@dougbu dougbu left a comment

🥇

@TanayParikh TanayParikh marked this pull request as ready for review Apr 22, 2022
@TanayParikh TanayParikh requested review from and wtgodbe as code owners Apr 22, 2022
@dougbu
Copy link
Member

@dougbu dougbu commented Apr 22, 2022

I still approve 😃

@TanayParikh
Copy link
Member Author

@TanayParikh TanayParikh commented Apr 22, 2022

@TanayParikh to avoid that, set $(IsUnitTestProject) and $(IsTestProject) to false in the project. Wasn't an issue before but this project name matches our usual test project names

Hmm that didn't seem to do it, the issue is persisting: https://dev.azure.com/dnceng/public/_build/results?buildId=1731849&view=logs&jobId=5ac7b393-e840-5549-7fb4-a4479af8e7e3&j=5ac7b393-e840-5549-7fb4-a4479af8e7e3&t=29df2fa2-0d20-51bd-e85a-8b546e86c529

5a96d33 set IsUnitTestProject and IsTestProject to false

@dougbu
Copy link
Member

@dougbu dougbu commented Apr 28, 2022

I rewrote the history of this PR to remove reverted commits, rebased on 'main', and added the workarounds discussed above and in Teams. The result seems simpler than I expected though the 11 brand new commits were a bit of work 😉

Some of the commits are strictly cleanup as I went along (hitting issues).

eng/tools/RunTests/ProcessResult.cs Outdated Show resolved Hide resolved
@dougbu dougbu requested a review from HaoK Apr 28, 2022
eng/helix/helix.proj Outdated Show resolved Hide resolved
@@ -19,14 +19,18 @@ static async Task Main(string[] args)
{
keepGoing = await runner.InstallDotnetToolsAsync();
}
#if INSTALLPLAYWRIGHT

Copy link
Member

@HaoK HaoK Apr 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the reason I did this was because some queues don't support playwright but maybe now that we are building this on CI rather than on the actual machines, this doesn't matter anymore, but just something to be aware of

@HaoK
Copy link
Member

@HaoK HaoK commented Apr 28, 2022

Looks great overall, I'd suggest we take this opportunity now that we are moving it to rename this RunHelixTests or something similar since its not longer in the helix content directory

@HaoK
Copy link
Member

@HaoK HaoK commented Apr 28, 2022

HelixTestRunner for the project is my vote

dougbu added 14 commits Apr 29, 2022
  - add generation to GenerateFiles.csproj
  - include all required versions in eng/Versions.props
    - nit: bump tool versions slightly
    - `dotnet-dump` move from `5.0.0-*` to `6.0.322601` is largest version bump
  - have `git` ignore generated file
    - nit: put `*.svclog` together w/ other extension exclusions
  - get tool packages from Helix correlation root
  - to do this, save and restore NuGet.config file
  - this removes `--version` from `dotnet-dump` and `dotnet-ef` installations
    - will only have a single package for each tool in the correlation payload
  - mostly cleanup; no longer needed
  - mostly cleanup
  - `dotnet-ef` tool now restored by Arcade's Tools.proj much earlier in our build because
    most configured tool packages are needed in `RunTests` on Helix agents
  - remove `INSTALLPLAYWRIGHT` define and `$env:INSTALLPLAYWRIGHT`
  - always reference Microsoft.Playwright in `RunTests`
  - nit: `InstallPlaywrightAsync()` wasn't `async`; fix it and rename to `InstallPlaywright()`
  - match most other projects in this repo
    - remove empty Directory.Build.props and .targets files preventing Arcade imports
  - exclude project build if `$(SkipTestBuild)` (though not a test project)
- don't need the project on Helix agents
- restore Directory.Build.* files removed when switching to Arcade
- less confusing given `RunTests` target and runtests.sh et cetera
@dougbu dougbu force-pushed the taparik/fixHelixRestoreIssue branch from 04e7adf to 5b14ca6 Compare Apr 29, 2022
@dougbu
Copy link
Member

@dougbu dougbu commented Apr 29, 2022

HelixTestRunner for the project is my vote

Good suggestion, especially since we hook into an Arcade RunTests target and have scripts named runtests.*

HaoK
HaoK approved these changes Apr 29, 2022
Copy link
Member

@HaoK HaoK left a comment

Nice!

@@ -15,10 +17,14 @@
<_TemplateProperties>
AspNetCorePatchVersion=$(AspNetCorePatchVersion);
DefaultNetCoreTargetFramework=$(DefaultNetCoreTargetFramework);
DotnetDumpVersion=$(DotnetDumpVersion);
dotnetefVersion=$(dotnetefVersion);
Copy link
Member

@HaoK HaoK Apr 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit: casing of dotnetefVersion here is wonky compared to everything else like DotnetDump

Copy link
Member

@dougbu dougbu Apr 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree but it has to match the casing of the dependency in Version.Details.xml for strange reasons related to the wild logic in the https://github.com/dotnet/aspnetcore/blob/main/eng/Dependencies.props#L218 item group.

I may see if property name case-insensitivity makes a difference these days but will leave that for another PR (even though this one is failing validation).

eng/helix/helix.proj Show resolved Hide resolved
@dougbu
Copy link
Member

@dougbu dougbu commented Apr 30, 2022

Found what I think is the last bug in this PR. %(HelixCorrelationPayload.Destination) metadata shouldn't have a trailing slash of any type. Adding a backslash causes problems on Unix-based Helix agents.

image

@dougbu dougbu enabled auto-merge (squash) Apr 30, 2022
@dougbu dougbu merged commit 0be2c29 into main Apr 30, 2022
25 checks passed
@dougbu dougbu deleted the taparik/fixHelixRestoreIssue branch Apr 30, 2022
@msftbot msftbot bot added this to the 7.0-preview5 milestone Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants