Skip to content

Use a single pipeline with runtime conditioned jobs in PRs - #1473

Merged
safern merged 3 commits into
masterfrom
SinglePipeline
Jan 16, 2020
Merged

Use a single pipeline with runtime conditioned jobs in PRs#1473
safern merged 3 commits into
masterfrom
SinglePipeline

Conversation

@safern

@safernsafern commented Jan 8, 2020

Copy link
Copy Markdown
Member

This PR deletes all the individual per-partition builds and adds all the builds to runtime.yml and conditions tests and builds based on paths changed in a PR.

The result of this PR is as follows:

CoreCLR Builds

BuildPRRolling CI
Build CoreCLR OSX x64 CheckedOnly CoreCLR or Libraries ChangesAlways
Build CoreCLR Linux x64 CheckedOnly CoreCLR ChangesAlways
Build CoreCLR Linux arm CheckedOnly CoreCLR ChangesAlways
Build CoreCLR Linux arm64 CheckedOnly CoreCLR ChangesAlways
Build CoreCLR Linux musl x64 CheckedOnly CoreCLR ChangesAlways
Build CoreCLR Windows NT x64 CheckedOnly CoreCLR ChangesAlways
Build CoreCLR Windows NT x86 CheckedOnly CoreCLR ChangesAlways
Build CoreCLR Windows NT arm CheckedOnly CoreCLR ChangesAlways
Build CoreCLR Windows NT arm64 CheckedOnly CoreCLR ChangesAlways
Build CoreCLR OSX x64 ReleaseAlwaysAlways
Build CoreCLR Linux x64 ReleaseAlwaysAlways
Build CoreCLR Linux arm ReleaseAlwaysAlways
Build CoreCLR Linux arm64 ReleaseAlwaysAlways
Build CoreCLR Linux musl x64 ReleaseAlwaysAlways
Build CoreCLR Linux musl arm64 ReleaseAlwaysAlways
Build CoreCLR Windows NT x64 ReleaseAlwaysAlways
Build CoreCLR Windows NT x86 ReleaseAlwaysAlways
Build CoreCLR Windows NT arm ReleaseAlwaysAlways
Build CoreCLR Windows NT arm64 ReleaseAlwaysAlways
Formatting Linux x64Only CoreCLR ChangesAlways
Formatting Windows NT x64Only CoreCLR ChangesAlways

Libraries Builds

BuildPRRolling CI
Build Libraries OSX x64 DebugAlwaysNever
Build Libraries OSX x64 ReleaseNeverAlways
Build Libraries Linux x64 DebugAlwaysNever
Build Libraries Linux x64 ReleaseNeverAlways
Build Libraries Linux arm ReleaseAlwaysAlways
Build Libraries Linux arm64 DebugAlwaysNever
Build Libraries Linux arm64 ReleaseNeverAlways
Build Libraries Linux musl x64 DebugAlwaysNever
Build Libraries Linux musl x64 ReleaseNeverAlways
Build Libraries Linux musl arm64 ReleaseAlwaysAlways
Build Libraries Windows NT x64 DebugAlwaysNever
Build Libraries Windows NT x64 ReleaseNeverAlways
Build Libraries Windows NT x86 ReleaseAlwaysAlways
Build Libraries Windows NT x86 DebugOnly Libraries ChangesNever
Build Libraries Windows NT arm ReleaseAlwaysAlways
Build Libraries Windows NT arm64 ReleaseAlwaysAlways
Build Libraries WebAssembly wasm DebugOnly Libraries ChangesNever
Build Libraries WebAssembly wasm ReleaseNeverAlways
Build Libraries All Configurations x64 DebugOnly Libraries ChangesNever
Build Libraries All Configurations x64 ReleaseNeverAlways
Build Libraries NETFX x86 ReleaseOn Libraries ChangesAlways
Build Libraries NETFX x64 ReleaseNeverAlways

Installer Build and Test

BuildPRRolling CI
Installer Build and Test OSX x64 DebugAlwaysNever
Installer Build and Test OSX x64 ReleaseNeverAlways
Installer Build and Test Linux x64 DebugAlwaysNever
Installer Build and Test Linux x64 ReleaseNeverAlways
Installer Build and Test Linux arm DebugAlwaysNever
Installer Build and Test Linux arm ReleaseNeverAlways
Installer Build and Test Linux arm64 DebugAlwaysNever
Installer Build and Test Linux arm64 ReleaseNeverAlways
Installer Build and Test Linux musl x64 DebugAlwaysNever
Installer Build and Test Linux musl x64 ReleaseNeverAlways
Installer Build and Test Linux musl arm64 DebugAlwaysNever
Installer Build and Test Linux musl arm64 ReleaseNeverAlways
Installer Build and Test Windows NT x64 DebugAlwaysNever
Installer Build and Test Windows NT x64 ReleaseNeverAlways
Installer Build and Test Windows NT x86 DebugAlwaysNever
Installer Build and Test Windows NT x86 ReleaseNeverAlways
Installer Build and Test Windows NT arm DebugAlwaysNever
Installer Build and Test Windows NT arm ReleaseNeverAlways
Installer Build and Test Windows NT arm64 DebugAlwaysNever
Installer Build and Test Windows NT arm64 ReleaseNeverAlways

CoreCLR Test Builds

BuildPRRolling CI
CoreCLR CrossGen Linux arm CheckedOnly CoreCLR ChangesAlways
CoreCLR Pri0 Test Build OSX x64 CheckedOnly CoreCLR ChangesAlways
CoreCLR Pri0 Test Build Linux x64 CheckedOnly CoreCLR ChangesAlways
CoreCLR Pri0 Test Build Linux arm CheckedOnly CoreCLR ChangesAlways
CoreCLR Pri0 Test Build Linux arm64 CheckedOnly CoreCLR ChangesAlways
CoreCLR Pri0 Test Build Windows NT x64 CheckedOnly CoreCLR ChangesAlways
CoreCLR Pri0 Test Build Windows NT x86 CheckedOnly CoreCLR ChangesAlways
CoreCLR Pri0 Test Build Windows NT arm CheckedOnly CoreCLR ChangesAlways
CoreCLR Pri0 Test Build Windows NT arm64 CheckedOnly CoreCLR ChangesAlways

Libraries Test Build

BuildPRRolling CI
Libraries Test Build OSX x64 DebugCoreCLR or Libraries ChangesNever
Libraries Test Build OSX x64 ReleaseNeverAlways
Libraries Test Build Linux x64 DebugCoreCLR or Libraries ChangesNever
Libraries Test Build Linux x64 ReleaseNeverAlways
Libraries Test Build Windows NT x64 DebugCoreCLR or Libraries ChangesNever
Libraries Test Build Windows NT x64 ReleaseNeverAlways

CoreCLR Test Runs

BuildPRRolling CI
CoreCLR Pri0 Test Run OSX x64 CheckedCoreCLR ChangesAlways
CoreCLR Pri0 Test Run Linux x64 CheckedCoreCLR ChangesAlways
CoreCLR Pri0 Test Run Linux arm CheckedCoreCLR ChangesAlways
CoreCLR Pri0 Test Run Linux arm64 CheckedCoreCLR ChangesAlways
CoreCLR Pri0 Test Run Windows NT x64 CheckedCoreCLR ChangesAlways
CoreCLR Pri0 Test Run Windows NT x86 CheckedCoreCLR ChangesAlways
CoreCLR Pri0 Test Run Windows NT arm CheckedCoreCLR ChangesAlways
(Removed, not enough hardware) CoreCLR Pri0 Test Run Windows NT arm64 CheckedCoreCLR ChangesAlways

Libraries Test Runs (Release CoreCLR)

BuildPRRolling CI
Libraries Test Run OSX x64 DebugLibraries ChangesNever
Libraries Test Run OSX x64 ReleaseNeverAlways
Libraries Test Run Linux x64 DebugLibraries ChangesNever
Libraries Test Run Linux x64 ReleaseNeverAlways
Libraries Test Run Linux arm ReleaseNeverAlways
Libraries Test Run Linux arm64 ReleaseNeverAlways
Libraries Test Run Linux musl x64 DebugLibraries ChangesNever
Libraries Test Run Linux musl x64 ReleaseNeverAlways
Libraries Test Run Linux musl arm64 ReleaseNeverAlways
Libraries Test Run Windows NT x64 DebugLibraries ChangesNever
Libraries Test Run Windows NT x64 ReleaseNeverAlways
Libraries Test Run Windows NT x86 ReleaseLibraries ChangesAlways
Libraries Test Run Windows NT x86 DebugLibraries ChangesNever

Libraries Test Run (Checked CoreCLR)

BuildPRRolling CI
Libraries Test Run OSX x64 DebugCoreCLR Changes or Libraries ChangesNever
Libraries Test Run OSX x64 ReleaseNeverAlways
Libraries Test Run Linux x64 DebugCoreCLR ChangesNever
Libraries Test Run Linux x64 ReleaseNeverAlways
Libraries Test Run Linux musl x64 DebugCoreCLR ChangesNever
Libraries Test Run Linux musl x64 ReleaseNeverAlways
Libraries Test Run Windows NT x64 DebugCoreCLR ChangesNever
Libraries Test Run Windows NT x64 ReleaseNeverAlways
Libraries Test Run Windows NT x86 ReleaseCoreCLR ChangesAlways
(Disabled) Libraries Test Run Windows NT arm ReleaseCoreCLR ChangesAlways
Libraries Test Run Windows NT arm64 ReleaseNeverAlways

cc: @jkotas@stephentoub @danmosemsft @BruceForstall

@safern
safernforce-pushed the SinglePipeline branch 13 times, most recently from de62bfc to bc6fe28CompareJanuary 9, 2020 05:27
Comment threadeng/pipelines/runtime.yml Outdated
Comment threadeng/pipelines/runtime.yml Outdated
@safern
safernforce-pushed the SinglePipeline branch 14 times, most recently from c20d9c3 to 105ce20CompareJanuary 12, 2020 00:06
@safern

Copy link
Copy Markdown
MemberAuthor

Doesn't that mean that when only touching libraries you increase the CI time significantly?

Actually from my tests I've seen that running tests against a Checked runtime takes similar time to release, so if we run tests for OSX x64 and Windows x86 it shouldn't increase time significantly. Specially because we build libraries tests once for each OS, so that saves some time. I think it is worth the try, we can always remove them, but is good extra coverage.

@ViktorHofer

Copy link
Copy Markdown
Member

Actually from my tests I've seen that running tests against a Checked runtime takes similar time to release

Looks like you are right. In coreclr release/3.1 on a random build, corefx checked takes about 1h 10min: https://dev.azure.com/dnceng/public/_build/results?buildId=483366&view=logs&jobId=dbf66e29-15d1-5c85-f25f-a8bda8f9b70c.

@dagooddagood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Infra LGTM. Just a formatting suggestion--my usual hatred of scrolling horizontally. 😄

Comment threadeng/pipelines/runtime.yml Outdated
@safern

Copy link
Copy Markdown
MemberAuthor

Looks like you are right. In coreclr release/3.1 on a random build, corefx checked takes about 1h 10min

Right and I believe that's dependent on how long it takes to provision a helix machines, for example in this run for this current PR it took 11 mins.
https://dev.azure.com/dnceng/public/_build/results?buildId=481127

Comment threadeng/pipelines/runtime.yml
@BruceForstall

Copy link
Copy Markdown
Contributor

Looks like you're matrix is missing:

CoreCLR Pri0 Test Build Linux arm64 Checked
CoreCLR Pri0 Test Run Linux arm64 Checked

There are a lot of CoreCLR Release builds. Are these required for some non-CoreCLR test runs? They aren't used for any CoreCLR test runs, and it seems like we could save CI resources by only doing one or two as Release build spot-checks in PRs unless they are otherwise required.

There is no

Build Libraries Linux arm Debug
Build Libraries Linux musl arm64 Debug
Build Libraries Windows NT x86 Debug
Build Libraries Windows NT arm Debug
Build Libraries Windows NT arm64 Debug

in the table. Is that an intentional pruning of the full matrix?

@safern

safern commented Jan 15, 2020

Copy link
Copy Markdown
MemberAuthor

There are a lot of CoreCLR Release builds. Are these required for some non-CoreCLR test runs?

Yes these are required to run libraries and installer tests... we want to run tests against a release CoreCLR. We will only use the Checked ones for CoreCLR changes, however as discussed here, I will add a couple that will also happen when there are libraries changes.

However, I will see in the test matrix for installer and libraries and see if we can prune some CoreCLR Release builds.

Looks like you're matrix is missing:

Thanks 😄

Is that an intentional pruning of the full matrix?

Yes, we try to balance out the Debug/Release builds we do by covering in other arches, OSs, I basically just ported over what we've been testing in Libraries from the corefx world.

@ViktorHofer

Copy link
Copy Markdown
Member

However, I will see in the test matrix for installer and libraries and see if we can prune some CoreCLR Release builds.

Just my 5c. I don't think we should trim builds further. I would even go into the opposite direction and always build everything (still with a good mix of Debug vs Release). With the single pipeline we are already saving costs in comparison to what we had before if you combine coreclr + corefx + core-setup. Running only a specific set of tests (libraries vs coreclr) makes sense as that's the most resource intensive phase.

@jaredpar

Copy link
Copy Markdown
Member

. I would even go into the opposite direction and always build everything (still with a good mix of Debug vs Release).

We need to be careful with builds that use hardware resources like ARM. These are much more limited than our VM builds. The intent going into this is we would exclude ARM unless CLR changed to ensure they had sufficient resources to make progress on ARM specific changes.

@ViktorHofer

Copy link
Copy Markdown
Member

The intent going into this is we would exclude ARM unless CLR changed to ensure they had sufficient resources to make progress on ARM specific changes.

AFAIK we always want to build on arm but limit testing on it.

@safern

Copy link
Copy Markdown
MemberAuthor

AFAIK we always want to build on arm but limit testing on it.

Building on arm doesn't take any arm resources, so it's fine to build for arm, for windows we build on x64 machines but target arm as the architecture. For Linux, we use docker images with a cross rootfs directory that contains all the arm binaries, and build using that as the root file system.

@BruceForstall

Copy link
Copy Markdown
Contributor

I'm fine with building everything as long as it doesn't cost too many resources we care about, doesn't increase long pole times, and doesn't cause resource exhaustion when many PR's happen simultaneously. With one caveat: the more jobs we have, the more likely it seems we will have a "random" failure in one or more of the jobs. With so many moving parts in this system, this seems inevitable. This because super frustrating for users.

@safern

Copy link
Copy Markdown
MemberAuthor

Yeah I totally agree and I tried to keep the matrix as minimal as possible, but building release coreclr is required to run libraries and installer tests. I think I came up with the minimal set of the matrix.

We could evaluate, but something that we could do is add more conditions and for example if coreclr is the only partition touched, only run libraries and installer tests on a checked runtime and that would avoid building release coreclr, but I thought that was more prone to errors and missing the right coverage that we've been having for years already.

Comment threadeng/pipelines/runtime.yml
@safern

Copy link
Copy Markdown
MemberAuthor

CoreCLR failure is: https://github.com/dotnet/coreclr/issues/26241
Libraries failure is: #131

I added a commit to disable the Libraries test on a checked runtime: db5e58b

Merging as everything else was green.

@sandreenko

Copy link
Copy Markdown
Contributor

Thanks @safern , that looks great.

The only question is about "CoreCLR Pri0 Test Run Windows NT arm64 Checked job", I believe we do not run tests on arm64 windows (do not have enough machines). Historically that job existed only to build tests (because there was no separation between "Build tests" and "Run tests"), but now that probably should be deleted to avoid confusion.

@josalem

Copy link
Copy Markdown
Contributor

CoreCLR failure should be resolved by #1794!

@trylek

Copy link
Copy Markdown
Member

I believe we'll need a bit to iterate on the ideal platform combo. @jkotas is specifically asking for runs against checked builds to catch assert failures and I believe he's got a very valid point. I continue working with dnceng and DDFUN to make them provide us with reasonable HW.

@safern

Copy link
Copy Markdown
MemberAuthor

The only question is about "CoreCLR Pri0 Test Run Windows NT arm64 Checked job", I believe we do not run tests on arm64 windows

Right, it currently doesn't run any tests as it is disabled, same for arm (which @trylek is working on). I'll put up a PR to remove it from the test runs to not confuse people as it will basically just be a no-op.
https://github.com/dotnet/runtime/blob/master/eng/pipelines/coreclr/templates/helix-queues-setup.yml#L129

@ghostghost locked as resolved and limited conversation to collaborators Dec 11, 2020
MichalStrehovsky added a commit to MichalStrehovsky/runtime that referenced this pull request Dec 9, 2021
The GVM analysis within the compiler assumes we can do analysis on top of canonical forms and we get analysis holes if the canonical form doesn't exist at compile time.
GVM dispatch at runtime might end up building new types as well, so the extra template isn't strictly just bloat but I do admit there's some laziness in just throwing the extra template in to fix the problem.
This wasn't hittable outside reflection-free mode because we generate canonical forms of everything outside reflection-free mode anyway.
As I was looking for a place to put this in, I realized the `TypeNeedsGVMTableEntries` logic needs to run on canonical types as well (those are not `ConstructedEETypeNode`), so I moved it to a common spot. That part was not necessary to fix the reported problem, but it provides a convenient spot to put the canonical type dependency.
Fixesdotnet#1473.
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

11 participants

@safern@jkotas@stephentoub@ViktorHofer@BruceForstall@jaredpar@sandreenko@josalem@trylek@jkoritzinsky@dagood