-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Live-live CI pipeline #294
Conversation
8e240f9
to
56e396e
Compare
I'm also not clear on what I've broken in the "coreclr-libraries" pipeline so if anyone can help shed light on that, I would be super grateful. |
7425f14
to
b43c421
Compare
Other than that, I must admit I find it almost impossible to conclusively prove that we're using the live-live artifacts everywhere with so much nuget downloading going on everywhere around; for now I tend to think this needs to be a collective effort after merging in the initial implementation of the live-live CI pipeline involving scrutiny by experts on build logic for the individual subrepos. |
I'm also trying to figure out how to incorporate core_setup aka installer testing in the pipeline but I know very little about what actually happens there - I tried to run the "installer" script locally and it seems to have Crossgened the framework and then crashed with some nuget download bug - so I'm in doubt whether I should follow up on that with help from the relevant experts or just merge in a limited version of the change without the installer chores and leave those to people more familiar with this logic. |
e5e78e6
to
9701d36
Compare
@jkoritzinsky where do we document our software requirements around tools like Python for Linux? The Linux requirements document doesn't specify this in the same way that the Windows one does. |
According to my best knowledge, this commit should end up with a green runtime-libraries and runtime-coreclr (at this moment still representing my initial implementation of the live-live pipeline). Remaining issues I'm aware of:
Thanks Tomas |
@@ -5,6 +5,7 @@ parameters: | |||
archType: '' | |||
framework: netcoreapp | |||
isOfficialBuild: false | |||
useLiveCoreClr: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going forward when should this ever be false and what would the impact of that be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this change I haven't yet dropped the support for both "live-live runs" and "partial runs" picking up some artifacts from external locations. I can easily imagine this limitation may be temporary but, in its current form, dropping this condition would invalidate the "legacy" runtime-libraries pipeline. I assume it's up to further discussion in our meetings how exactly to sequence the transformation.
I have started to review. Based on my first pass this looks like great progress thank you @trylek. I have noticed that the coreclr pipeline is loosing coverage. I think this is fine, so long is it is documented and we can work on recovering this in later changes. I will attempt to document what is being lost as part of my review. My suggestion as a min-bar for testing in this change would be:
Coverage to be re-added
Coverage lost but I suggest not re-adding
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an overview feedback. This change looks like it is removing the idea of specific pipelines per area path. Either that or it is modifying coreclr/pr.yml
into a root pr.yml
. Either way I think we should change the direction to do the following:
- Create a new root
pr.yml
without modifyingcoreclr/py.yml
- The contents of this
pr.yml
should be similar to what is currently in this pr. I will make suggestions on what to remove assuming the pr.yml changed in this pr will be the new pr.yml for the root pipeline
- The contents of this
- Undo the changes to
coreclr/pr.yml
so that we will not lose coverage. If there is work to be done that is outside of the scope of what has been done already remove/comment out the bits that do not work such that we have minimum coverage detailed Live-live CI pipeline #294 (comment) - Installer will need to have work in its CI, which I expect to be less than corefx and coreclr. This should be done in a subsequent PR.
I will continue a deeper review assuming that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest looks good. The overview review sounds a bit daunting at first; however, the framework that you guys have built should make it I think pretty smooth to transition.
Thanks for all the great work.
src/coreclr/build-test.cmd
Outdated
@@ -577,8 +581,10 @@ REM ============================================================================ | |||
|
|||
if NOT "%__LocalCoreFXPath%"=="" ( | |||
echo Patch CoreFX from %__LocalCoreFXPath% | |||
set __CoreFXBuildType=Debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be the opposite, assume it is release. If the build type is debug then use a debug corefx. That way we can correctly use a release corefx build with a checked runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks for pointing that out. Ultimately we may want to introduce options for [semi-]arbitrarily combining configuration modes for the individual components (CoreCLR, CoreFX, tests in either subrepos - not sure what degrees of freedom we have) but I think it will be easier to address in a follow-up change.
src/coreclr/build-test.sh
Outdated
@@ -136,7 +136,12 @@ patch_corefx_libraries() | |||
{ | |||
echo "${__MsgPrefix}Patching CORE_ROOT: '${CORE_ROOT}' with CoreFX libaries from enlistment '${__LocalCoreFXPath}" | |||
|
|||
patchCoreFXArguments=("-clr_core_root" "${CORE_ROOT}" "-fx_root" "${__LocalCoreFXPath}" "-arch" "${__BuildArch}" "-build_type" "${__BuildType}") | |||
__CoreFXBuildType=Debug | |||
if [ "$__BuildType" == "release" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as the windows file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
CI succeeded excellent work! |
eng/pipelines/libraries/base-job.yml
Outdated
- buildScriptFileName: libraries | ||
- _BuildConfig: Debug | ||
- ${{ if eq(parameters.buildConfig, 'release') }}: | ||
- _BuildConfig: Release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be part of xplat-setup.yml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw is comparison here case-sensitive? because in libraries/.azure-ci.yml
we pass it down as upper-case.
eng/pipelines/libraries/base-job.yml
Outdated
# Windows variables | ||
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}: | ||
- _msbuildCommand: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 -warnaserror:0 -ci | ||
- _runtimeOSArg: /p:RuntimeOS=win10 | ||
- _archiveExtension: '.zip' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this? This should already be defined in xplat-setup.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, you're right, this should be no longer necessary with all your refactorings, will remove, thank you!
@@ -37,11 +44,13 @@ jobs: | |||
- EMSDK_PATH: $(Build.BinariesDirectory)/emsdk | |||
- ${{ if eq(parameters.runTests, true) }}: | |||
- _buildAction: -build -buildtests /p:ArchiveTests=true | |||
- ${{ if ne(parameters.framework, 'allConfigurations') }}: | |||
- ${{ if and(ne(parameters.framework, 'allConfigurations'), ne(parameters.useLiveCoreClr, true)) }}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we want to skip restoring the tests when useLiveCoreClr
is not being used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll double-check this, I may have confused this with the other property to not restore the CoreCLR framework (as we're using the live one).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. That property is to avoid restoring libraries test-projects. AllConfigurations is a special framework which doesn't build libraries test projects at all (it builds custom package tests) so we don't need to restore test projects as part of its restore step.
These complementary properties should let us drop all automatic transformations of CoreCLR vs. library build modes and thus substantially simplify the live-live pipeline and make it more general at the same time. I have reverted the changes to the build-test scripts that were taking care of this logic on the local build side as well as the change to eng/pipelines/libraries/base-job and bits of the other YAML files on the CI side. Thanks Tomas
993d487
to
12f30fa
Compare
12f30fa
to
b668b57
Compare
cleanUnpackFolder: false | ||
artifactFileName: '$(librariesArtifactName)$(archiveExtension)' | ||
artifactName: '$(librariesArtifactName)' | ||
displayName: 'live-built CoreFX' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CoreFX -> Libraries.
dependsOn: | ||
- ${{ format('coreclr_product_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} | ||
- ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}: | ||
- ${{ format('libraries_build_{0}_{1}{2}_{3}_{4}', 'netcoreapp', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveLibrariesBuildConfig) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might make sense to remove netcoreapp
from the libraries build names when target framework is netcoreapp as libraries is the only subset that builds for other frameworks. That way we don't need to hard code it here. Something to consider on a follow up PR.
eng/pipelines/runtime.yml
Outdated
- Windows_NT_arm64 | ||
jobParameters: | ||
isOfficialBuild: false | ||
testScope: empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to pass this down here. The default is already ''
. This is just used when running the tests as part of the build-job.
- librariesDownloadDir: '' | ||
|
||
- ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}: | ||
- librariesArtifactName: ${{ format('libraries_bin_{0}_{1}{2}_{3}_{4}', 'netcoreapp', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveLibrariesBuildConfig) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might make sense to move these artifactName
variables to xplat-setup template as it is used to upload and download and we already have all the required parameters at that point. Anyway, that can be done in a follow up PR, just calling it out so that we don't forget.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from the yml changes. I don't have much context on the coreclr test scripts, but looks good to my small knowledge of it.
I have rebased the change against Santiago's CoreFX YAML refactoring
which simplified the change substantially. I have received an almost green
run and my cursory validation confirmed that live artifacts are indeed being
used.
I hit trouble on Linux x64 that doesn't seem to support Python3, I'm currently
experimenting with downgrading the patch-corefx.py script to not explicitly
target Python3. As a form of instrumentation to simplify development I'm
still hijacking the PR YAML file under CoreCLR for the "live-live pipeline", that's
not to be merged in, otherwise I believe the change to be mostly ready for
review.
I have slightly unified naming of the libraries jobs with the coreclr jobs. There's
a slight wrinkle in CoreCLR supporting three configurations (debug / checked
/ release) wherease CoreFX only supports debug / release. In this change
I have fixed CoreFX YAML scripts to also pretend to support the three configs,
just internally remapping "checked" to "debug" in base-job.yml.
[After all, in the live-live mode, there's technically a difference between debug
and checked version of CoreFX w.r.t. consuming the respective version of
CoreLib. I guess this logic is up to further development to support various
cross-building scenarios, e.g. debug CoreFX builds consuming release CoreLib.
I haven't tried to address these scenarios in my change but they should be
pretty straightforward to implement on top of it.]
As I assume that most people are on the Thanksgiving prolonged weekend,
I continue developing the change as I doubt I'll get it sufficiently reviewed
before next Monday. In particular, I have started working on incorporating
CoreFX testing. If any reviewers happen to be available (if I start receiving
review feedback), I'll fix the instrumentation by moving the YAML file and
I'll finalize the change so that it can be merged in.
Thanks
Tomas